[Fwd: Re: [PHP] Trying to get mysql_fetch_array data into phplot.]

From: Date: Wed, 15 Oct 2003 02:25:49 +0000
Subject: [Fwd: Re: [PHP] Trying to get mysql_fetch_array data into phplot.]
Groups: php.general 
Request: Send a blank email to php-general+get-166153@lists.php.net to get a copy of this message
I'm trying to track progress etc..say running and how each run gets' progressivly longer etc...or the time decreases as the distance stays the same etc.. Anyway, when doing the mysql_fetch_array, I need that data to somehow not get lost once the while loop has completed, also, I need to stack the array so that phplot can run w/ it... The data that gets passed to phplot.php should look like the following, but..that's only b/c I'm printr inside the while loop...You cannot pass the DrawGraph function inside the loop and expect it to function it correctly. If someone would like to give me some ideas/tips/pointers it would be greatly appreciated! -jamied It would help if I had included the output etc...
This is what it should look like: rray (
    [0] => Array
        (
            [0] => 0
            [1] => 2003-10-01
            [2] => 2.68
        )
) Array (
    [0] => Array
        (
            [0] => 0
            [1] => 2003-10-01
            [2] => 2.68
        )
    [1] => Array
        (
            [0] => 1
            [1] => 2003-10-04
            [2] => 15
        )
) How I'm currently doing this! while ($row = mysql_fetch_array($result)) { $date = $row["r_date"]; $dist = $row["r_distance"]; $rundata[$count]=array("$count","$date",$dist); $count++; echo "<pre>"; print_r($rundata); echo "</pre>"; } Those last three commands would obviously be removed, Anyway, if someone can offer some needed guidance, it would be appreciated!

« previous php.general (#166153) next »