Forum Moderators: coopster
I have a script that updates about 3000 records hourly well my main issue is this. The update starts and about 400 records into the update script, it stops . Sometimes it may go all the way and sometimes it does not.
Nothing changes in the scripting from one event to the next. As in sructured data wise.Is there a limit to the mysql_query update feature to PHP or MYSQL that wold cause this.
This is an example of my issue.
$tonytiger = mysql_query("select * from world");
while($goathurder = mysql_fetch_arrary($tonytiger))
{
$rickeet = mysql_query("select * from yukon where timeline='$goathurder[hunted]'");
$poco = mysql_fetch_array($rickeet);
$place = $goathurder[place] + $poco[place];
$yoogie = mysql_query("update location set place='$place' where hunted='$goathurder[hunted]'");
}
Now this query has been known to complete many times with 3000 records but its the time it does not that is my question.
You may want to quote the brackets, $goathurder['hunted']....do you not get warnings in the script because of this?
Also, try using the mysql_escape_string(); function on the strings you put into the database, that could be why some records get updated and some dont.
//forgot
welcome to webmasterworld!
Now as for the ['hunted'] I like that it does define to query better. But actually i do not get script errors from it but it does answer a question to another issue I had it makes sense as to why it does not work at all. lol...
Can you explain the use of the escape_string(); function in a little more detail to me for I am not aware of it
it will escape strings before you put them into the database
[php.net...]
do you get any errors from the script? it's worth viewing the script and seeing what it says.
Another possibility is the script is timing out? the php default is 30 seconds....does it stop after 30 seconds?
Just trying to narrow it down, you know what it's like, a stray character here and tehre and it can all go to pot ;)