Executed Query -> select l.id,lh.points as points,l.instant as instant, if(l.list_type = "h", min(h.id), null) as hid, l.listing_title,l.list_type,l.room_type,l.address1,l.country,l.area1,l.area2,l.locality,l.zipcode,l.longitude,l.latitude, if(l.list_type = "h", min(if(h.nightly_price is not null and h.nightly_price > 0, h.nightly_price, l.nightly_price)), l.nightly_price) as nightly_price, if(l.list_type = "h", min(if(h.currency_type>0, h.currency_type, if(l.currency_type>0, l.currency_type, 20))), if(l.currency_type>0, l.currency_type, 20)) as currency_type, l.guest_number,l.additional_guests_charge,l.maximum_stay,l.minimum_stay,l.description,l.price_range, l.user_id,l.bookbeforedate,l.eventstartdate,l.eventenddate from tbl_listing l left join tbl_hotel_room_type h on (l.id = h.list_id ) left join tbl_users lh on (l.user_id = lh.uid ) where l.status='a' and l.visible='v' and l.approve='y' and (l.address1 like '%100 hallmark lane , covington , ga , usa , , ,%' ) and (l.guests >= '1' or h.guests >= '1' ) and ( l.list_type != 'h' or ( l.bookbeforedate is not null and l.bookbeforedate != '' and l.bookbeforedate != '0000-00-00' and l.bookbeforedate >= curdate() and l.eventenddate is not null and l.eventenddate != '' and l.eventenddate != '0000-00-00' and l.eventenddate >= curdate() ) ) and l.latitude is not null and l.latitude != '' and l.longitude is not null and l.longitude != '' and l.latitude != 0 and l.longitude != 0 and l.latitude between 24 and 50 and l.longitude between -125 and -66 group by l.id order by (case when l.list_type = 'h' then 0 else 1 end), lh.points desc, l.created desc
ERROR:"SQLSTATE[HY000]: General error: 1030 Got error 28 from storage engine: 319"