Welcome Guest, Not a member yet? Register   Sign In
MySQL Set Increment Field plus 1
#2

[eluser]WanWizard[/eluser]
Why is the syntax of the query in your log different from the one you typed in using PHPMyAdmin? Any why is the query in the error message different as well?

Do you use a prefix? According to your log, you don't. So shouldn't the query be
Code:
EXPLAIN UPDATE `views` SET `hits` = hits+1 WHERE `rid` = ‘62’;

BTW, only reason for this query being slow could be that you don't have an index on the 'rid' column. And if you do, you either have a slow database server, millions or records, or lots of concurrent updates on a MyISAM table.


Messages In This Thread
MySQL Set Increment Field plus 1 - by El Forum - 06-14-2010, 10:27 AM
MySQL Set Increment Field plus 1 - by El Forum - 06-14-2010, 11:20 AM
MySQL Set Increment Field plus 1 - by El Forum - 06-14-2010, 11:25 AM
MySQL Set Increment Field plus 1 - by El Forum - 06-14-2010, 11:35 AM



Theme © iAndrew 2016 - Forum software by © MyBB