forum

Home / DeveloperSection / Forums / mysql SET and UPDATE

mysql SET and UPDATE

Anonymous User290009-Jul-2013
Hi Expert!

I'm trying to replace a column value based off values from other columns, but I keep getting syntax errors. What am I doing wrong? Here's what I've tired:

SELECT * FROM `table` WHERE `id_1` =164 and `id_2` = 6
SET `id_1` = (188|164)
WHERE `id_1` = 164 AND `id_2` = 6 
UPDATE `table`

This gives me a syntax near SET.

SELECT * FROM `table` WHERE `id_1` = 164 AND `id_2` = 6
UPDATE `table`
SET `id_1` = 188
WHERE `id_2` = 6

This gives me an error for everything below UPDATE.

Help? Thanks.

Updated on 09-Jul-2013
I am a content writter !

Can you answer this question?


Answer

2 Answers

Liked By