Warning: [mysql error 3065] Expression #1 of ORDER BY clause is not in SELECT list, references column 'ococnd2012_pi240.piwi_images.date_available' which is not in SELECT list; this is incompatible with DISTINCT SELECT DISTINCT(image_id) FROM piwi_image_category INNER JOIN piwi_images ON id = image_id WHERE category_id = 5 AND (category_id NOT IN (7,8,9,10,11,13)) ORDER BY date_available DESC, file ASC, id ASC ; in /home/ococnd2012/public_html/ococ-gallery/include/dblayer/functions_mysqli.inc.php on line 798

Fatal error: Call to a member function fetch_assoc() on boolean in /home/ococnd2012/public_html/ococ-gallery/include/dblayer/functions_mysqli.inc.php on line 181