我GROUP_CONCAT
在 mysql 查询中使用,但查询给了我意想不到的未知结果。这是查询:
SELECT GROUP_CONCAT( DISTINCT (categoryid) )
FROM jos_community_groups
WHERE team_classification
IN (
SELECT id
FROM jos_league_classification
ORDER BY winning_criteria ASC
)
AND show_in_contact =1
AND team_state = 'Georgia'
AND categoryid
IN (
SELECT sportstypeid
FROM jos_gsa_tournament
WHERE directorid =305
)
ORDER BY categoryid, team_agegroup, team_classification
结果看起来像这样
GROUP_CONCAT( DISTINCT ( categoryid ) ) // column
[BLOB - 10B] // result
我想要逗号分隔的 categoryid 字符串,但我不明白为什么查询会给出这种类型的结果以及查询中缺少什么。