SELECT *, CASE WHEN `locality` LIKE "pine grove%" 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 ("pine grove") 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
$949,00024200 Golden Ridge DrVolcano CA 95689View Listing
$899,99916896-16896 Wilderness WayJackson CA 95642View Listing
$880,00010372 Tabeaud RdPine Grove CA 95665View Listing
$835,00019015 E Pine DrPioneer CA 95666View Listing
$819,00025624 Sherwood DrPioneer CA 95666View Listing
LIGHTBOX-IMAGES
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