SELECT *, CASE WHEN `locality` LIKE "brundidge%" 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 = "AL" AND (locality IN ("brundidge") 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 24
Blah
SELECT *, CASE WHEN `locality` LIKE "brundidge%" AND `slide_location` = "city-agent" AND `logo_file_name` IS NOT NULL THEN 10 WHEN `slide_location` = "city-agent" AND `logo_file_name` IS NOT NULL THEN 5 END as `rank` FROM `wp_slides` WHERE st = "AL" AND (locality IN ("brundidge") OR locality IS NULL) AND slide_location IN ("city-agent") AND active = 1 ORDER BY `rank` DESC LIMIT 12
[2] matching rows / [0.00 msec]
Blog ID 24
Blah
$375,000County Road 3336Brundidge AL 36010View Listing
$280,0007300 Highway 239Banks AL 36005View Listing
$263,5003429 Alabama Highway 125Brundidge AL 36010View Listing
$239,6003914 County Road 4408Brundidge AL 36010View Listing
$178,40022 3AC County Road 114Brundidge AL 36010View Listing
$169,90018935 Highway 125Brundidge AL 36010View Listing
$169,000County Road 4409Brundidge AL 36010View Listing
$160,00020AC County Road 114Brundidge AL 36010View Listing
$152,000County Road 4404Banks AL 36005View Listing
LIGHTBOX-IMAGES
LENDORS & TITLE COMPANIES
SELECT *, "0" as `rank` FROM `wp_slides` WHERE st = "AL" 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 24
Blah