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 IF(prior, 0, 1) ASC, prior ASC' at line 13 on LINE: 53 in FILE: /home/itua/public_html/inc/menu_horiz.inc.php