Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 804
Mustafa Avatar asked Dec 04 '25 00:12

Mustafa


1 Answers

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.

like image 53
Mustafa Avatar answered Dec 06 '25 14:12

Mustafa