mysql group concat blob bug: Solved

Oct 17, 2012   //   by kdecom   //   database, mysql  //  No Comments
MySql Group_concat blob bug: solve
Mysql group_concat blob bug:solved

I was working with mysql

One query that i was doing which is:

SELECT GROUP_CONCAT(name))
FROM product
WHERE id   IN (12345,12346,12347)

It used to come up with the result of blob which doesn’t help to me.
So i found one solution for that which is:

convert the result into char. so your query will looks something like this:

SELECT GROUP_CONCAT(CAST(name AS CHAR))

FROM product

WHERE  id   IN (12345,12346,12347)

Here is how you can do order by for group_concat mysql function

SELECT GROUP_CONCAT(name ORDER BY name))
FROM product
WHERE id   IN (12345,12346,12347)

I hope it helps

Leave a comment

css.php