Query SELECT `listings`.`sid` as `object_sid`, if( COUNT( `complex_enum` ) >0, COUNT( * ) - COUNT( `complex_enum` ) +1, COUNT( * ) ) `count` FROM `listings` JOIN `listings_properties` ON `listings`.`sid` = `listings_properties`.`object_sid` WHERE 1 AND `listings`.`active` = '1' AND `listings`.`listing_type_sid` = '6' AND `listings`.`status` = 'approved' AND ( (`listings` . `access_type` = 'everyone') OR (`listings` . `access_type` = 'only' AND FIND_IN_SET('', `listings` . `access_list`) ) OR (`listings` . `access_type` = 'except' AND (FIND_IN_SET('', `listings` . `access_list`) = 0 OR FIND_IN_SET('', `listings` . `access_list`) IS NULL) ) ) AND (0 OR(1 AND (`id` = 'JobCategory' AND ( FIND_IN_SET('Professional Services', `value`) )) ) ) GROUP BY `listings_properties`.`object_sid` HAVING `count` = 1 ORDER BY priority desc, CompanyName ASC : Unknown column 'CompanyName' in 'order clause'
There are no listings with requested parameters in the system. |