Notice: Undefined variable: search in /home/urbaviac/public_html/items.php on line 37

Fatal error: Uncaught PDOException: SQLSTATE[42000]: Syntax error or access violation: 1064 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 'order by ifnull(existen,0) + ifnull(existenu,0) desc, descrip asc' at line 40 in /home/urbaviac/public_html/items.php:115 Stack trace: #0 /home/urbaviac/public_html/items.php(115): PDOStatement->execute() #1 /home/urbaviac/public_html/index.php(445): include('/home/urbaviac/...') #2 {main} thrown in /home/urbaviac/public_html/items.php on line 115