Forum Moderators: open

Message Too Old, No Replies

Trouble with an INSERT

         

madmatt69

9:24 pm on Aug 19, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hey all,

I'm trying to update a forum's user table with a few things.

Here's teh statement I'm trying out:

INSERT INTO forum_users(user_custom_field) VALUES ('My Custom Field') WHERE user_id = 489;

I keep getting a syntax error on the WHERE portion...Any ideas where I'm going wrong?

LifeinAsia

10:13 pm on Aug 19, 2008 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



You need to use UPDATE instead of INSERT:
UPDATE forum_users SET
user_custom_field='My Custom Field'
WHERE user_id = 489