!!!!!! SELECT a.*,(a.p_price/a.p_area) AS price_sqm, c.p_location,c.description,c.imotbgtxt,c.complex_name,c.headpic_alt,c.vfile1,c.youtube_link,c.p_knowplace,c.gtrans,c.prop_of_week,c.social_post_link,c.social_post_link2,c.social_post_link3 from properties a use index(`ad_type`,`order_by`) ,properties_data c WHERE a.ad_hide='0' and a.ad_hide_BP='0' AND (a.p_townid='283' or a.p_townid2='283') AND (
CASE WHEN (
a.p_townid = '283'
)
THEN (
a.location_prefix = 'near'
)
WHEN (
a.p_townid2 = '283'
)
THEN (
a.location_prefix != ''
)
END
) AND a.publish=1 and a.p_cntrid='1' AND (YEAR( a.ad_pubdate ) >2018
OR ( YEAR( a.ad_pubdate ) <=2018 AND a.ad_status !=1 )
) and a.ID=c.ID AND c.lang='en' ORDER BY a.top DESC, a.ad_position ASC, a.ad_pubdate DESC LIMIT 0,20
We use cookies to offer you a better browsing experience, serve personalized ads, measure results and analyze traffic. If you click on I accept all cookies button, you agree to receive all cookies from this site and from third parties.