SELECT a.*, b.created_by FROM jos_jomcomment as a, jos_content as b WHERE a.`contentid`='115' AND ( a.`option`='com_content' OR a.`option`='com_myblog') AND a.`published`='1' AND b.`id`=a.`contentid` ORDER BY date ASC, id ASC MySQL server has gone away