Notice: Undefined index: search in /var/www/html/prevent/api/myapp/protect.query.php on line 4

Fatal error: Uncaught exception 'Exception' with message 'DbMySql->DbMySql::queryRecords: sql [select s_protect , protect.s_visit , visit.s_visit, visit.visitdate, protectlk.s_protectlk , protectlk.name as protectlkname , protect.description from protect,protectlk,visit where protect.s_protectlk = protectlk.s_protectlk AND protect.s_visit = visit.s_visit AND visit.s_visit = ] -> You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 14' in /var/www/html/lib/nmd15/db/mySql/DbMySql.php:30 Stack trace: #0 /var/www/html/prevent/api/myapp/protect.query.php(28): DbMySql->queryRecords('select \n s_p...') #1 {main} thrown in /var/www/html/lib/nmd15/db/mySql/DbMySql.php on line 30