array max question

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
gaagaagui
Forum Newbie
Posts: 7
Joined: Fri Dec 27, 2002 6:04 pm
Location: Crown Point, IN USA

array max question

Post by gaagaagui »

Regarding:

$inr = mysql_num_rows($iresult);
$irow = Array();
for ($a=0; $a<$inr; $a++) {
array_push($irow, mysql_fetch_object($iresult));
}

My result set is quite large - about 7000 records including about 20 fields from an inner join - I need all 20 fields. The php script konks out after about 1500 iterations I assume because of a maximum size for an array. Is there a better way to store a high number of results sets in an array than the way? Perhaps this is not the forum for this question. Thanks for any help.
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Post by Weirdan »

It's possible that you ran out of memory. Check the php.ini. Default memory limit is 8MB.
Post Reply