MYSQL ERROR
Error:Out of memory (Needed 4194276 bytes)
Query:SELECT SQL_CALC_FOUND_ROWS DISTINCT IF (FIND_IN_SET('52', `T1`.`Crossed`) > 0, 1, 0) AS `Crossed_listing`, `T1`.*, `T1`.`Shows`, `T3`.`Path` AS `Path`, `T3`.`Key` AS `Key`, `T3`.`Type` AS `Listing_type`, COUNT(`T6`.`Thumbnail`) AS `Photos_count`, if( `T1`.`Sub_status`='invisible' OR `T1`.`Sub_status` = 'visible', SUBSTRING_INDEX(GROUP_CONCAT(DISTINCT `T6`.`Thumbnail` ORDER BY `T6`.`Type` DESC, `T6`.`ID` ASC), ',', 1), CONCAT( SUBSTRING_INDEX(SUBSTRING_INDEX(GROUP_CONCAT(DISTINCT `T6`.`Thumbnail` ORDER BY `T6`.`Type` DESC, `T6`.`ID` ASC), ',', 1), '.', 1), '_', `T1`.`Sub_status` ,'_Ro', '.', SUBSTRING_INDEX(SUBSTRING_INDEX(GROUP_CONCAT(DISTINCT `T6`.`Thumbnail` ORDER BY `T6`.`Type` DESC, `T6`.`ID` ASC), ',', 1), '.', -1))) AS `Main_photo` ,IF(UNIX_TIMESTAMP(DATE_ADD(`T1`.`Featured_date`, INTERVAL `T2`.`Listing_period` DAY)) > UNIX_TIMESTAMP(NOW()) OR `T2`.`Listing_period` = 0, '1', '0') `Featured` FROM `vbro_listings` AS `T1` LEFT JOIN `vbro_listing_plans` AS `T2` ON `T1`.`Plan_ID` = `T2`.`ID` LEFT JOIN `vbro_categories` AS `T3` ON `T1`.`Category_ID` = `T3`.`ID` LEFT JOIN `vbro_listing_photos` AS `T6` ON `T1`.`ID` = `T6`.`Listing_ID` LEFT JOIN `vbro_accounts` AS `T7` ON `T1`.`Account_ID` = `T7`.`ID` WHERE ( UNIX_TIMESTAMP(DATE_ADD(`T1`.`Pay_date`, INTERVAL `T2`.`Listing_period` DAY)) > UNIX_TIMESTAMP(NOW()) OR `T2`.`Listing_period` = 0 OR 2 =2 ) AND ((`T1`.`Category_ID` = '52' OR (FIND_IN_SET('52', `T1`.`Crossed`) > 0 AND `T2`.`Cross` > 0 )) OR (`T1`.`Category_ID` = '') OR ( (FIND_IN_SET('', `T1`.`Crossed`) > 0) AND `T2`.`Cross` > 0)) AND `T1`.`Status` = 'active' AND `T3`.`Status` = 'active' AND `T7`.`Status` = 'active' AND `T1`.`Sub_status` <> 'invisible' GROUP BY `T1`.`ID` ORDER BY `Featured` DESC , `ID` DESC LIMIT 0, 10
Function:getAll
Class:rlDb
File:/home/vbarci/public_html/includes/classes/rlListings.class.php (line# 719)