Re: MySQL fetch data
| From: | Chris Hewitt | Date: | Thu, 27 Jun 2002 11:12:45 +0000 |
| Subject: | Re: MySQL fetch data | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-104133@lists.php.net to get a copy of this message | ||
Jefferson,
I am wondering why you would want to do this. If you get the sql statement to order the rows the way you need to use them then there should not be a need to refer back to earlier rows. I sometimes need to know if one field has the same value as in the previous record, so I keep its value in a simple variable so I know if, for example, it is for the same customer or not. I have never found it necessary to refer back an arbitary number of rows, so hence the question.
I wonder if you are trying to do too much in a single sql statement?
Regards
Chris
Jefferson Cowart wrote:
Is there any way to return all the rows returned by a mysql query with one command. Currently I have to run through a for or while loop the same number of times as there are rows and take that row and copy it to an array. I end up with an array of arrays but it seems like it would be a common enough problem that the function would already exist.