How to get count from each filed contain separated commas using mysql

“SELECT GROUP_CONCAT( DISTINCT `board_id` ) , (
CHAR_LENGTH( GROUP_CONCAT( DISTINCT `board_id` ) ) – CHAR_LENGTH( REPLACE( GROUP_CONCAT( DISTINCT `board_id` ) , ‘,’, ” ) ) +1
) AS totalcount
FROM “.FOLLOWING_FOLLOWERS.” AS B
WHERE B.status = ‘”.FOLLOW.”‘
AND B.type = ‘”.FOLLOWING.”‘
AND user_id =”.$userid;

Advertisements

About venkatraja

student
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s