On Jun 24, 2005, at 4:19 AM, Andy Todd wrote:

> - Do you need to do the group_concat transposition in SQL or would  
> it be
> better achieved in Python after you've select all of the group,  
> comment
> pairs from the database?

If you're grouping a particular column, you MUST use some kind of  
aggregate function on that column (eg, sum, max, or the mysql  
specific group_concat).

The alternative is to retrieve N times more rows and do the grouping  
and concatenation in python, which is inefficient. What Kolbe trying  
to do should work just fine.

-- 
    ("`-/")_.-'"``-._        Chris Cogdon <[EMAIL PROTECTED]>
     . . `; -._    )-;-,_`)
    (v_,)'  _  )`-.\  ``-'
   _.- _..-_/ / ((.'
((,.-'   ((,/   fL

_______________________________________________
DB-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/db-sig

Reply via email to