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. > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php