… handle the result in loop mysql_fetch_array (here I use PHP functions but they are common or …with prepared statements: < ?php $mysqli = new mysqli(“localhost”, “root”, “”, “test”); /* check connection */ if (mysqli_connect_errno()) { printf(“Connect failed: %s\n”, mysqli_connect_error()); exit(); }…
Post: PHP Large result sets and summary tables.
… limit is not controlled by memory_limit PHP config variable because that only controls memory… can use mysql_unbuffered_query instead and mysqli and PDO have their own way to…fetch_row simply reads data from memory and so most applications do not care to check if there are any errors while fetching…

