SELECT *, CASE WHEN `locality` LIKE "leominster%" 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 = "MA" AND (locality IN ("leominster") 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 27
Blah
SELECT *, "0" as `rank` FROM `wp_slides` WHERE st = "MA" 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 27
Blah
$2,700,000356 Hollis RdLunenburg MA 01462View Listing
$1,595,00014 Jacobson Dr Lot 45Boylston MA 01505View Listing
$1,495,0001368 Main StLancaster MA 01523View Listing
$1,350,00010 Stephanie Anne LnSterling MA 01564View Listing
$1,349,000210 Sunset LnLunenburg MA 01462View Listing
$1,280,000Stephanie Anne Ln Lot 12Sterling MA 01564View Listing
$1,200,000Stephanie Anne Ln Lot BA12Sterling MA 01564View Listing
$1,100,00039 Carter RdWestminster MA 01473View Listing
$1,050,00015 Houghton RdPrinceton MA 01541View Listing
$1,050,000High Street ExtAyer MA 01432View Listing
LIGHTBOX-IMAGES
LENDORS & TITLE COMPANIES
SELECT *, "0" as `rank` FROM `wp_slides` WHERE st = "MA" 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 27
Blah