Re: creating unique data series per category
| From: | Jason Barnett | Date: | Thu, 22 Apr 2004 02:13:33 +0000 |
| Subject: | Re: creating unique data series per category | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-23515@lists.php.net to get a copy of this message | ||
Rafi Sheikh wrote:
Hi List, does any one know how to create unique data series (arrays) per given category? For example: I would like to have a stacked bar graph hence needing series of data that belongs to each category in my category column. An example would be, number of tickets by client over 6 months. I do not know how many client will be returned. I do nto need SQL help. This is what my SQL does: mysql_connect("flame", "gopher", "********"); mysql_select_db ("reqmet"); $mysql_result = mysql_query ("SELECT Account, count(RequestID) as total, date_format(Mo,'%Y-%m') as time from rfsrequests where Date_closed is not null group by Account having count(requestID) > 10 order by Account, total desc"); The resulting data needs to be assigned (hence my problem) to data series or arrays per Account. I am also unsure about how to then assign those arrays to a variable. (For anyone who cares, that variable then gets plugged into a jpgraph accumulated bar graph).The function you need is mysql_fetch_array() http://www.php.net/manual/en/function.mysql-fetch-array.php