[SOLVED] Simple sql update statement

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Ne0
Forum Commoner
Posts: 60
Joined: Sat Feb 14, 2004 11:48 am

[SOLVED] Simple sql update statement

Post 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.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

count your quotes. you're missing 1.
Ne0
Forum Commoner
Posts: 60
Joined: Sat Feb 14, 2004 11:48 am

Post by Ne0 »

oo, missed that one. thanks a bunch :)
Post Reply