Author Topic: using the right syntax for mysql update?  (Read 1302 times)

0 Members and 1 Guest are viewing this topic.

Offline proudTopic starter

  • Enthusiast
  • Posts: 57
    • View Profile
using the right syntax for mysql update?
« on: February 17, 2007, 07:19:12 PM »

I'm trying to subtract 1 from a field called reply but i dont know what is the right syntax to use?
The red part is where the syntax needs to be corrected...

UPDATE `forum_question` SET `reply` = `reply-1` WHERE `forum_question`.`id` =3 ;";

Offline fenway

  • MySQL Si-Fu / PHP Resident Alien
  • Global Moderator
  • 'Mind Boggling!'
  • *
  • Posts: 15,444
  • Gender: Male
    • View Profile
Re: using the right syntax for mysql update?
« Reply #1 on: February 17, 2007, 07:20:55 PM »
You mean `reply`-1....
:anim_rules: Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.