Re: mysql_fetch_array pointer
| From: | Jason Morehouse | Date: | Thu, 06 Jun 2002 04:08:15 +0000 |
| Subject: | Re: mysql_fetch_array pointer | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-19633@lists.php.net to get a copy of this message | ||
mysql_data_seek($result_cat,0);
http://www.php.net/manual/en/function.mysql-data-seek.php
On Tue, 29 Aug 2000 22:55:11 +1200, Jeffrey Barendse wrote:
> I like to use a script like this:
>
>
> $result_cat = mysql_query("select cat_naam from categorie order by
> cat_naam");
>
> while($row = mysql_fetch_array($result_cat))
> { echo '<OPTION VALUE="' . (urlencode($row[cat_naam])) .
> '">' .
> $row[cat_naam]; }
>
> while($row = mysql_fetch_array($result_cat))
> { echo $row[cat_naam]; }
>
>
> In the first while function it works fine. But in the other I have no
> date. I suppose the mysql_fetch_array sets a pointer. Is there a way to
> reset the pointer so I can reuse a query?
>
> Regards,
>
> Jeffrey Barendse
> WireITup
--
Jason Morehouse (jm@netconcepts.com)
Netconcepts LTD - Auckland, New Zealand
* Linux: Because rebooting is for adding hardware.