so i have a program that is supposed to update a table called master by increasing the clicked field by 1 for every time the email shows up on a second list (tempop); it worked fine when i tested it on a small dataset - the tables were 5000 and 200 rows in size in my original testing. The problem is for the real program to function, it needs to be able to handle tables of size 70,000 and 20,000. This is my current code, but as you can see it involves what is equivalent to a nested loop - which seems impossible just considering the large numbers. The fatal error of max execution time of 30 seconds seems to be holding me back. Can anyone recommend any way to improve my efficiency? I may be able to use a dedicated server so i could increase the max execution time, which would reduce the necessity for high efficieny, but that is a last resort.

$parO = "('";
$parC = "')";
$selectclick = "SELECT email FROM tempop";
$resultclick = mysql_query($selectclick);
$numclick = mysql_numrows($resultclick);
$j = 0;
$var = array();
$var[$j] = mysql_result($resultclick,$j);
echo("$j - ".$var[$j]."<br>");
while ($k < $numclick) {
	$update = "UPDATE master SET clicked=clicked+1 WHERE email = ".$parO.$var[$k].$parC.'Limit 1';
	echo($k." ".$var[$k]."<br>");
		or die(mysql_error());
7 Years
Discussion Span
Last Post by pritaeas
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.