MySQL Query Error

SELECT count(*) FROM `lbcms_products` WHERE `show`=1 and attribute_id in(0,23) and (title like '%R%') or (regulatory like '%R%') and attribute_id in(0,23) or (cat like '%R%') and attribute_id in(0,23)
MySQL server has gone away