So i'm working with huge MYSQL database of english words. the list has upwards of 180k words. Im trying to run a query, and then compute something using every word in the database. The problem is the database is so big, and it seems to be freezing my browser (Im working locally with MAMP). Is there a way I can do five queries at a time, instead of trying to run through the whole thing, so i can see the results coming in gradually in my browser? Heres the code:
<?php
require 'class.thing.php';
require 'db_config.php';
$result = mysql_query("SELECT * FROM words") or die ("Could not complete query");
while($row = mysql_fetch_array($result))
{
$word = $row['word'];
$compute = $word."thing";
$finished = new method( $compute );
if ($finished->successfull()) {
echo "<br/>";
echo "worked!";
echo "<br/>";
} else {
echo "uh oh..";
}
}
?>
** im looking for something like:
$result = mysql_query("SELECT * FROM words") or die ("Could not complete query LIMIT 0,5");
get results
wait 5 seconds
$result = mysql_query("SELECT * FROM words") or die ("Could not complete query LIMIT 0,5");
get results
etc...