I was wondering if anyone can explain why this SQL command doesn't work

UPDATE users SET visits=visits+1, WHERE user_id='$user' AND
password='$password'

the $user and $password are variables that are inserted by PHP, what I'm
specifically looking at is the visits=visits+1 which is simple enough and
taken virtually from the mySQL documentation. The line below works fine in
which I set a set value.

UPDATE users SET visits=4 WHERE user_id='$user' AND password='$password'

Any help would be appreciated
Jamie

Reply via email to