php update MYSQL problem
so i have a php page update that adds 1 to the tally like this
mysql_query("update table set entry1 = entry1 + '1' where user = '$user'");
The problem is it is being used SO quickly so often that it seems it is missing alot of updates. What would be a better way of doing this that guarantees each update is counted?
It isn't the answer to your question, but I'd eliminate the single quotes around '1'
Can you explain the situation a bit more? Why is this query executed so often? And why do you think a lot of updates are lost?
Database doesn't miss any update sent.
How do you know there are missing updates?
i am using it to manage users but it is being sent to a separate place that itself includes a count, and it is higher
also this is being updated upto 500 times a second is that enough for it to possibly miss an update or possibly grab the old entry1 before the new 1 is added in
Grab the old entry1, no.
Originally Posted by matt121400
Maybe the request might time out, if too many requests are in the queue. But that should give you an error, I think ?