Wednesday 5 September 2018
Subscribe to:
Post Comments (Atom)
SELECT r.region_name, r.region_id, r.abbreviation, r.map_order,
(IFNULL( COUNT( p.property_id ) , 0 )) AS propertyCount
FROM `rmp_region` r
LEFT OUTER JOIN `rmp_property` p
ON p.path LIKE CONCAT( '%/', r.region_id, '/%' )
WHERE p.active =1
AND r.parent_region_id =1
GROUP BY r.region_name, r.region_id, r.abbreviation, r.map_order
ORDER BY r.map_order ASC
SELECT r.region_name, r.region_id, r.abbreviation, r.map_order,
(IFNULL( COUNT( p.property_id ) , 0 )) AS propertyCount
FROM `rmp_region` r
LEFT OUTER JOIN `rmp_property` p
ON p.path LIKE CONCAT( '%/', r.region_id, '/%' ) and p.active =1
WHERE r.parent_region_id =1
GROUP BY r.region_name, r.region_id, r.abbreviation, r.map_order
ORDER BY r.map_order ASC
Hello Friends! I am Ramana a part time blogger from Hyderabad.
0 comments:
Post a Comment