Re: charts and mysql

From: Date: Thu, 29 Jun 2000 11:01:17 +0000
Subject: Re: charts and mysql
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-3770@lists.php.net to get a copy of this message
Bartosz Aninowski, > Please look at follwoing piece of code > ---------cut > include "../pass/inc/config.inc"; > $result=mysql_db_query($SQLDB,"SELECT name,click FROM stat "); > $row = mysql_fetch_array($result); > > > $GraphWidth = 400; > $GraphHeight = 200; > $GraphScale = 2; > $GraphFont = 5; > $GraphData = ? click > $GraphLabel = ? name > -----cut > I want variable $GraphData to take data from row "click" and $GraphLabel > from row "name" > I tried to do this in many ways but it shown only one column from five > available in database > Please tell me how to do that or show me any similar code. $GraphData = $row[click]; $GraphLabel = $row[name]; When you use mysql_fetch_array it returns an array with the fieldname as the name of the cell in the array. -- Øyvind Grønnesby "Wow, I had knowledge!" --Buffy

« previous php.general (#3770) next »