Something is wrong in your syntax obok 'AND termin >= '2019-04-24' ORDER BY termin ASC' w linii 1