I had the same problem with a large database. I ran out of memory, despite the fact that it did not change the $ row variable by about 400,000 records, but an unbuffered request fixed it.
Just for reference to others (and me when I do it again!), Some unbuffered request code:
$sql = "SELECT SEQ, RECTYPE, ROSTERGRP, EMPNM, EMPNUM, DT, RDUTYCAT, ADUTYCAT FROM " . $tblRosters . " ORDER BY EMPNUM,DT"; $result = mysql_unbuffered_query( $sql, $dbConn ); $svRow = array(); while ( $row = mysql_fetch_array( $result ) ) {
source share