SELECT *, CASE WHEN `locality` LIKE "banning%" AND `slide_location` = "" AND `logo_file_name` IS NOT NULL THEN 10 WHEN `slide_location` = "" AND `logo_file_name` IS NOT NULL THEN 5 END as `rank` FROM `wp_slides` WHERE st = "CA" AND (locality IN ("banning") OR locality IS NULL) AND (cat IS NULL) AND name NOT IN ("home-top", "home-bot") AND (slide_file_name IS NOT NULL AND slide_file_name != "") AND (slide_location IS NULL OR slide_location = "") AND name NOT IN ("agent") AND active = 1 ORDER BY `rank` DESC LIMIT 12
[0] matching rows / [0.00 msec]
Blog ID 2
Blah
SELECT *, "0" as `rank` FROM `wp_slides` WHERE st = "CA" AND (cat IS NULL) AND (slide_file_name IS NOT NULL AND slide_file_name != "") AND (slide_location IS NULL OR slide_location = "") AND active = 1 ORDER BY `rank` DESC LIMIT 12
[0] matching rows / [0.00 msec]
Blog ID 2
Blah
$3,380,00011345 Sunnyslope AvenueBeaumont CA 92223View Listing
$2,900,0001862 E Westward AvenueBanning CA 92220View Listing
$2,100,00038692 Brookside AvenueCherry Valley CA 92223View Listing
$1,899,000101 W Lincoln StreetBanning CA 92220View Listing
$1,858,00037877 Potato Canyon RoadOak Glen CA 92399View Listing
$1,850,00068000 Silver Creek DriveBanning CA 92220View Listing
$1,600,000516 N California AvenueBeaumont CA 92223View Listing
$1,580,00011367 Cherry AvenueCherry Valley CA 92223View Listing
$1,500,000946 E LINCOLN StreetBanning CA 92220View Listing
$1,250,000921 W Westward AvenueBanning CA 92220View Listing
LENDORS & TITLE COMPANIES
SELECT *, "0" as `rank` FROM `wp_slides` WHERE st = "CA" AND (cat = "lenders" OR cat IS NULL) AND (slide_file_name IS NOT NULL AND slide_file_name != "") AND (slide_location IS NULL OR slide_location = "") AND active = 1 ORDER BY `rank` DESC LIMIT 12
[0] matching rows / [0.00 msec]
Blog ID 2
Blah