Unknown column in 'field list' error on MySQL Update query

Mustafa picture Mustafa · Jan 9, 2011 · Viewed 28k times · Source

i echoed the query below: (query is safe)

UPDATE otelozellik 
   SET isim_tr='test', 
       aciklama_tr='<p>test1</p>', 
       uyari_tr='test', 
       tag_tr='test' 
 WHERE id='1'

Database Error: Unknown column 'aciklama_tr' in 'field list'

I changed the order of columns, the one after isim_tr keeps giving error. When I move isim_tr to the last then the one after id giving the same error. But moving them to the last position is not a solution for me because table will be dynamic to add new columns when necessary. need an absolute solution.

UPDATE: LATEST SCREENSHOT: http://img5.imageshack.us/img5/7215/mysqlerror.jpg

Solved. Solution is answered below. Thanks everyone.

Answer

Mustafa picture Mustafa · Jan 9, 2011

Problem is solved. Thank you a lot everyone for their help.

Right Query for solution is:

UPDATE `holidaycholic`.`otelbilgi` SET `otelbilgi`.`isim_tr`='test2', `otelbilgi`.`aciklama_tr`='<p>test2</p>', `otelbilgi`.`uyari_tr`='test2', `otelbilgi`.`tag_tr`='test2' WHERE `otelbilgi`.`id`=1

No idea why but that worked for me.