Something is wrong in your syntax obok 'AND termin >= '2021-10-20' ORDER BY termin ASC' w linii 1