赞
踩
SELECT count(1) as count,aa.PUB_ORG_ID
FROM(SELECT SUBSTRING_INDEX( SUBSTRING_INDEX( a.PUB_ORG_ID, ',', help_topic_id + 1 ), ',',- 1 ) AS PUB_ORG_ID FROM mysql.help_topic m,pm_achievements a WHERE help_topic_id < LENGTH( a.PUB_ORG_ID ) - LENGTH( REPLACE ( a.PUB_ORG_ID, '', '' ) ) + 1
) AS aa
WHERE
aa.PUB_ORG_ID IS NOT NULL
GROUP BY
aa.PUB_ORG_ID
ORDER BY
aa.PUB_ORG_ID;
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。