RE: [PHP-DB] Accessing data from next row? (mysql)
| From: | John W. Holmes | Date: | Mon, 14 Oct 2002 07:40:06 +0000 |
| Subject: | RE: [PHP-DB] Accessing data from next row? (mysql) | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-22358@lists.php.net to get a copy of this message | ||
> Using mysql, how do I access the data of the next row using code
> something like this:
> $result = mysql_query("select column from table where
> whatever='whatever'");
> while($array = mysql_fetch_array($result)){
> //Whatever
> }
Each iteration of the while loop will fetch a row for you and it's
contents will be in the $array[] array. Try "echo $array['column'];"
inside of your while to see what I'm talking about.
---John Holmes...