Re: reset a resource?
| From: | Ben Liu | Date: | Thu, 08 Jun 2006 18:40:41 +0000 |
| Subject: | Re: reset a resource? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-237646@lists.php.net to get a copy of this message | ||
sorry, mysql_data_seek()
On 6/8/06, sam <php@itab.com> wrote:
After I've looped through a resource do I have to run the query again to load up 'mysql_fetch_assoc' or is there some kind of reset function I can't find? $q = "SELECT * FROM table; $s = mysql_query($q, $pe) or die(mysql_error()); while ($row_s = mysql_fetch_assoc($s)) {echo $i++;} outputs "12345..." for each row of table while ($row_s2 = mysql_fetch_assoc($q)) {...} outputs "" Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php