Re: mysql data after termination
| From: | Rob Curts | Date: | Tue, 18 Jul 2000 14:14:09 +0000 |
| Subject: | Re: mysql data after termination | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-7071@lists.php.net to get a copy of this message | ||
on 7/18/00 9:46 AM, Mukul Sabharwal at mukulsabharwal@yahoo.com wrote:
> mysql_fetch_array
it seems to work. I wrote up a quick script to do it and it loaded $row
fine. I don't see the point of doing this though. Why would you want to
close a statement before? On my machine I ran this script:
<?
$dbh = mysql_connect("localhost","user","pass");
mysql_select_db("DATABASE",$db);
$sql = "select USERNAME from EMP where STATUS = 0";
$sth = mysql_query($sql,$dbh);
mysql_close($dbh);
$timeA = microtime();
while ($ret = mysql_fetch_row($sth))
echo $ret[0]."<br>";
$timeB = microtime();
echo "Total Time for fetch: " . ((float)$timeB - (float)$timeA) . " sec\n";
?>
The time i got was 0.0015930000000001 seconds.
Cheers,
Rob