Page 1 of 1
"INSERT INTO a ('b') values ('c') where id = e" do
Posted: Sat Aug 04, 2007 6:44 am
by divx
connected to database
"INSERT INTO a ('b') values ('c') where id = e"
a = table name
why doesnt the above work?
Posted: Sat Aug 04, 2007 7:13 am
by Chris Corbyn
Why would you INSERT to a row that exists? You need UPDATE

Posted: Sat Aug 04, 2007 8:22 am
by superdezign
d11wtq wrote:Why would you INSERT to a row that exists? You need UPDATE

Or REPLACE and instead of using a WHERE clause, just set id.
Posted: Thu Aug 09, 2007 3:59 pm
by ody
Problems:
1. You have quotes around the column name, use back ticks instead.
2. Your INSERT has a WHERE clause.