Fatal error: Uncaught exception 'dpexception' with message '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 categories.name' at line 11 : SELECT DISTINCT categories.* FROM categories, auctions, lots WHERE lots.category_id = categories.id AND lots.auction_id = auctions.id AND auctions.id = ORDER BY categories.name' in /var/sites/antiquarianauctions.com/class/mysql.class.php:68 Stack trace: #0 /var/sites/antiquarianauctions.com/class/mysql.class.php(166): mysql->query('SELECT DISTINCT...') #1 /var/sites/antiquarianauctions.com/class/model.class.php(1857): mysql->get_all('SELECT DISTINCT...', 1) #2 /var/sites/antiquarianauctions.com/controller/lots.controller.php(584): model->get_rows('SELECT DISTINCT...') #3 [internal function]: lots_controller->result('6035') #4 /var/sit in /var/sites/antiquarianauctions.com/class/mysql.class.php on line 68