Page 1 of 1

[SOLVED] Simple sql update statement

Posted: Fri Aug 27, 2004 2:32 pm
by Ne0
This is bugging me to the point of no return, i have almost the entire forum working, all i have left is a few minor details. when i relize i forgot to update how many posts are in a forum after posting that that forum.
Ive done this before, so i just added a quick little piece to take the current posts, add one, then in the update statement update the posts.

Code: Select all

$sql4 = mysql_query("UPDATE f_forums SET lp_date='" . date("Y-m-d H:i:s") . "', lp_id='$poster_id', lp_name='$poster_name, posts='$posts' WHERE id='$forum'");
The entire thing works ECEPT the part that updates 'posts'. I have no idea what going on here....

Thanks in advanced.

Posted: Fri Aug 27, 2004 2:39 pm
by feyd
count your quotes. you're missing 1.

Posted: Fri Aug 27, 2004 2:50 pm
by Ne0
oo, missed that one. thanks a bunch :)