Fatal error: Uncaught mysqli_sql_exception: 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 1 in /mnt/web517/b3/92/54358792/htdocs/tickets/function/sql.php:37 Stack trace: #0 /mnt/web517/b3/92/54358792/htdocs/tickets/function/sql.php(37): mysqli->prepare() #1 /mnt/web517/b3/92/54358792/htdocs/tickets/function/sql.php(102): sql_n() #2 /mnt/web517/b3/92/54358792/htdocs/tickets/function/counttickets.php(4): sql() #3 /mnt/web517/b3/92/54358792/htdocs/tickets/order/order2.php(7): getAvailableTicketNum() #4 /mnt/web517/b3/92/54358792/htdocs/tickets/index.php(161): require_once('...') #5 {main} thrown in /mnt/web517/b3/92/54358792/htdocs/tickets/function/sql.php on line 37