note 15546 added to function.mysql-free-result

From: Date: Sun, 16 Sep 2001 22:46:30 +0000
Subject: note 15546 added to function.mysql-free-result
Groups: php.notes 
Request: Send a blank email to php-notes+get-18068@lists.php.net to get a copy of this message
Fairly straightforward. I don't use this very often at all, but when I have intensive programming after retrieving data from a database, and the next SQL statement isn't for many, many lines, or on the page at all, I will use it. You won't notice a difference, but it does help. example: $sql="SELECT this,that,theother,ding,dong FROM table WHERE blah='$blah' AND this='$that' ORDER BY something LIMIT 1000"; $result=mysql_query($sql); while($row=mysql_fetch_array($result)){ // all of the row extracts // } mysql_free_result($result); // subsequent programming blah blah... http://www.php.net/manual/en/function.mysql-free-result.php

« previous php.notes (#18068) next »