Thanks in advance all.
I have an AJAX list sorting script that loops through an array and changes the 'position' field in a db table. This works great until the number of records in the array exceeds 280.
I'm trying to work out how to overcome this.
A time delay usleep() does not help.
Perhaps I need to count the records and split the operation of the function into blocks of 280.
Perhaps I need to open a database connection then close it and open it again after 280 records.
Here is the script:
foreach ($_GET['listItem'] as $position => $item){
$sql = "UPDATE $dbProd SET position = '$position' WHERE id = '$item'";
mysql_query($sql) or die(mysql_error());
$query .= $sql;
}
print_r ($query);