I just cannot work this out.
I'm trying to update a table in my database every time someone posts on the forum, and add 1 to the field user_forum_posts
I can't/don't want to use a auto increment, because that wouldn't work, as there is more than 1 user and it would..well it wouldn't work, i'm sure you can see why.
I've been through loads of MySQL references, and the cloesest i can find is a Mathematical Function of + but i can't work out how to use it
I've tried:
PHP Code:
UPDATE `***`.`user_info` SET `user_forum_posts` +1 WHERE `user_info`.`user_id` =2 LIMIT 1 ;
PHP Code:
UPDATE `***`.`user_info` SET `user_forum_posts` + '1' WHERE `user_info`.`user_id` =2 LIMIT 1 ;
PHP Code:
UPDATE `***`.`user_info` SET `user_forum_posts` = +1 WHERE `user_info`.`user_id` =2 LIMIT 1 ;
PHP Code:
UPDATE `***`.`user_info` SET `user_forum_posts` = SUM(+1) WHERE `user_info`.`user_id` =2 LIMIT 1 ;
etc....
