Click here to Skip to main content
15,908,775 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi all...
i have a query like this :
SQL
SELECT group_concat( DISTINCT '',`fromfirstname`,': ','',`message` SEPARATOR '<br />' ) as Message,`fromusername`,`tousername`,`sessionname`,tofirstname,concat(DATE_FORMAT(`sentdate`,'%W , %b %d , %Y '),' ',`senttime`) as DateandTime FROM `tableins` WHERE  ((fromusername='" + sess + "' or tousername='" + toid + "') OR (fromusername='" + toid + "' or tousername='" + sess + "')) AND sentdate='" + DateTime.Now.ToString("yyyy-MM-dd") + "' GROUP BY `sessionname` ORDER BY `id` DESC

it will returns upto some limited charecters here my problem is i need to get all the data presented in table. i was suffered a lot with this issue..
can any one help me please....
thanks in advance
Posted
Updated 5-Mar-12 20:45pm
v3

1 solution

Here info on how to overcome this limit (of 1024) by concatenating multiple group_concat results.
http://code.openark.org/blog/mysql/sql-trick-overcoming-group_concat-limitation-in-special-cases[^]

You could also change the group_concat_max_len system variable to meet your needs.

Good luck!
 
Share this answer
 
v2
Comments
tulasiram3975 7-Mar-12 1:14am    
Thanks U So much....
E.F. Nijboer 7-Mar-12 3:25am    
Your very welcome :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900