SELECT GROUP_CONCAT(DISTINCT category.id) as ids FROM (`category`) LEFT JOIN `seourl` ON `category`.`seourl_id` = `seourl`.`id` WHERE (category.langcode IS NULL OR length(category.langcode) = 0 OR category.langcode='mn') AND `parent_id` IN ('10', '19', '20', '21', '22') AND (parent_id != 0) AND (deleted = 0)
result
array ( 'ids' => 35, 31);
same syntaxs
GROUP_CONCAT(cast(concat(c.id,\': \',c.name) AS char)SEPARATOR \', \') AS categorie_names
No comments:
Post a Comment