Fatal error: Location: /router.php Action: sel 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 'GROUP BY gallerylist_id ORDER BY RAND() LIMIT 4' at line 5 Query: SELECT DISTINCT gallerylist.* , price_value, price_title, type_title FROM gallerylist LEFT JOIN type ON gallerylist_type_id = type_id LEFT JOIN gallerylistprice ON gallerylist_id = gallerylistprice_gallerylist_id LEFT JOIN price ON price_id = gallerylistprice_price_id WHERE gallerylist_active = 1 AND gallerylist_id<>68 AND gallerylist_type_id = GROUP BY gallerylist_id ORDER BY RAND() LIMIT 4 Previous Query: SELECT * FROM price LEFT JOIN gallerylistprice ON gallerylistprice_price_id = price_id WHERE gallerylistprice_gallerylist_id = 68 ORDER BY price_value ASC in /home/www/client/www/CPT086/acces_web/class/myres.php on line 145