RE: [PHP] Re: MySQL fetch data
| From: | Cal Evans | Date: | Mon, 01 Jul 2002 20:19:39 +0000 |
| Subject: | RE: [PHP] Re: MySQL fetch data | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-104773@lists.php.net to get a copy of this message | ||
Jeff,
Also, try php.weblogs.com ADODB if you absolutly MUST have all of your data
in an array.
I'll agree with Richard that it's not a great idea unless there is a
specific need. While loops for displaying the contents of many records are
much better. (IMHO, etc...)
=C=
*
* Cal Evans
* Journeyman Programmer
* Techno-Mage
* http://www.calevans.com
*
-----Original Message-----
From: Richard Lynch [mailto:ceo@l-i-e.com]
Sent: Sunday, June 30, 2002 5:41 PM
To: php-general@lists.php.net
Subject: [PHP] Re: MySQL fetch data
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
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php