|
Posted by Bill Karwin on 01/12/06 19:57
"manny" <manny@dontspamonme.net> wrote in message
news:lvhcs1hjrv6r4m39dnl05sbad1cf67728p@4ax.com...
> Is there a way to do this with sql? How about sql with php?
I've seen a few articles on achieving a pivot table result with MySQL, and
they made my head hurt.
http://www.wellho.net/mouth/59_MySQL-Pivot-tables.html
http://en.wikibooks.org/wiki/Programming:MySQL/Pivot_table
http://www.onlamp.com/pub/a/onlamp/2003/12/04/crosstabs.html
Joe Celko's "SQL for Smarties" also gives several options for producing
crosstabs purely in SQL.
In some cases, it may be the quickest solution to get the raw data out of
the database and into your application code, and then massage it until you
get the result you want.
Regards,
Bill K.
Navigation:
[Reply to this message]
|