Warning: PDOStatement::execute() [pdostatement.execute]: MySQL server has gone away in /include/class.dataaccessobject.php on line 106

Warning: PDOStatement::execute() [pdostatement.execute]: Error reading result set's header in /include/class.dataaccessobject.php on line 106
SQLSTATE[HY000]: General error: 2006 MySQL server has gone away
SELECT g.* FROM main_gallery g JOIN main_image i ON i.gallery_id = g.id GROUP BY g.id ORDER BY g.added DESC, g.qty DESC LIMIT 99