\n"; flush(); echo "Gonna do: {$url}
\n"; $handle = fopen($url, "r"); $x=-1; while( $command = fgets($handle) ) { $x++; if( ($x % 2) == 0 ) { echo "Doing {$tables[floor($x/2)]}.
\n"; } echo substr($command, 0, 200)."
\n"; $query = str_replace("\\n", "\n", $command); $res = mysql_query($query) or die(mysql_error()." -- ".$query); echo "Affected ".mysql_affected_rows()." rows
\n"; // $row = mysql_fetch_array($res, MYSQL_ASSOC); unset($command); } // while thar be commands to execute fclose($handle); echo "Done!
\n"; mysql_close($conn); ?>