trying to run this sql in my modx query but it aint working!
Is their anything in the formatting that modx won’t like that I’ve missed?
$sql = "SELECT REPLACE(GROUP_CONCAT(DISTINCT `value`),’||’,’,’) AS `id` FROM `modx_site_tmplvar_contentvalues` `tv` INNER JOIN `modx_site_content` `content` ON(`content`.`id` = `TV`.`contentid`) WHERE `tv`.`tmplvarid` = 2 AND `content`.`published` = 1 AND `content`.`deleted` = 0 GROUP BY `tv`.`value` HAVING COUNT(*) > 1 ORDER BY `tv`.`value` ASC";