Jump to content

[SOLVED] INSERT into ... WHERE ...


YourNameHere

Recommended Posts

This is a stupid easy one but cant for the life of me find the solution.

 

I have a table that holds an ID and 6 empty columns for later use.

 

when I try and select the right id and then populate 1 or more of the empty columns I get a syntax error.

 

You have an error in your SQL syntax; check the manual that corresponds to your  MySQL server version for the right syntax to use near 'WHERE chatId =  'Chat_1257295904'' at line 1

 

here is the statement:

 

INSERT into invites (player1) values ('Cody') WHERE chatId = 'Chat_1257295904'

 

this is how the table is set up:

 

columns; chatId, player1 - player6

Link to comment
https://forums.phpfreaks.com/topic/180215-solved-insert-into-where/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.