Re: MySQL fetch data

From: Date: Sun, 30 Jun 2002 22:41:13 +0000
Subject: Re: MySQL fetch data
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-104766@lists.php.net to get a copy of this message
In article <00e001c21db3$7b1b66a0$0a01a8c0@jcowart> , jeff@cowart.net (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. Why do you think you need the data in an array? Usually, you can just deal with it immediately and discard it. I think Oracle lets you snatch a whole array at once, but not MySQL. If you screw up your SQL, you don't want to try to snatch the whole thing at once anyway -- The potential for trashing your web/db-server by asking for, oh, 10,000 records at once is just too high. Better safe than sorry. -- Like Music? http://l-i-e.com/artists.htm

« previous php.general (#104766) next »