sql output to a multidimensional array

From: Date: Thu, 07 Sep 2006 09:22:19 +0000
Subject: sql output to a multidimensional array
Groups: php.db 
Request: Send a blank email to php-db+get-42320@lists.php.net to get a copy of this message
I need the output of my sql to be a multidimensional array as follows. chart [ 'chart_data' ] =3D array ( array ( "", "2001", "2002", "2003", "2004" ), array ( "AAA", 0, 10, 30, 63 ), array ( "BBB", 100, 20, 65, 55 ), array ( "CCC", 56, 21, 0, 90 ) ); I have tried and am unable so far to get this out of my database. Any suggestions? "SELECT count( publications.title) AS title_number, publications.year, publications.affiliation=20 FROM publications GROUP BY affiliation, year ORDER BY year"; There is some "for loop" I am not getting, and am also not getting the = zero counts with the count(*).

« previous php.db (#42320) next »