Q:

All post message is not showing with sql GROUP_CONCAT

I have this comments table to store all comments of each Post
comment_id    comment_message    posts_id   u_id   created
=============================================================
46            comments....       2          6      1559376498
47            comments....       2          6      1559376502
48            comments....       2          6      1559376598

and comments_like table for each comment reaction (r_id) 
cl_id    comment_id   posts_id    u_id   r_id   created
=============================================================
42       46           2           6      6     1559376598
43       47           2           6      2     1559376598
44       48           2           6      8     1559376598
45       46           2           1      2     1559376598

Note: posts_id means posts table id, u_id means users table id, r_id means reaction id, comment_id means comment table id. 
Now, I want to get all comments for a specific ID with a list of reaction id's and that reaction id which is given by the logged user. 
For that, I am using the following SQL query but it's not showing my expected result :(
$query = $this->_db->_pdo->prepare("
            SELECT c.*, u.u_id, u.full_name, cl.r_id, GROUP_CONCAT(cl.r_id ORDER BY cl.u_id) AS r_id
            FROM comments AS c 
            LEFT JOIN users AS u ON c.u_id = u.u_id 
            LEFT JOIN comments_like AS cl ON cl.comment_id = c.comment_id 
            WHERE c.posts_id = '$post_id' 
            ORDER BY c.comment_id  ");  

Output of this query should be
1) all comments of specific post id ($post_id);
2) a list of reaction id's
3) reaction id of logged user. 

A:

You're missing a GROUP BY clause on your query so it is grouping all the comments into one row; you need to group by c.comment_id.  This should give you the results you want:
SELECT c.*, u.u_id, u.full_name, cl.r_id, 
       GROUP_CONCAT(cl.r_id ORDER BY cl.u_id) AS r_id
FROM comments AS c 
LEFT JOIN users AS u ON c.u_id = u.u_id 
LEFT JOIN comments_like AS cl ON cl.comment_id = c.comment_id 
WHERE c.posts_id = 2
GROUP BY c.comment_id
ORDER BY c.comment_id

Output:
comment_id  comment_message posts_id    u_id    created     u_id    full_name   r_id
46          comments....    2           6       1559376498  6       Bill Jones  2,6
47          comments....    2           6       1559376502  6       Bill Jones  2
48          comments....    2           6       1559376598  6       Bill Jones  8

Demo on dbfiddle

