2017-07-12 80 views
0

我想更新在phpMyAdmin的SQL table,更改列的值。 我的要求是:因爲該字段的類型是Varchar請求更新phpMyAdmin的

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 ID_Article='DIEPRESTATION'' at line 1 

我用like改變了它:

Update article set Id_LRU where ID_Article like 'DIEPRESTATION' 

而且它得到了

Update article set Id_LRU where ID_Article='DIEPRESTATION' 

它返回一個錯誤同樣的錯誤。 我應如何修正它,請。

+1

寫在谷歌「的MySQL更新」,並且choising獲得的鏈路中的一個(例如第二個。):https://www.w3schools.com/php/php_mysql_update.asp或第三個的https:// WWW .w3schools.com/SQL/sql_update.asp – etsa

回答

1

你有語法錯誤。

Update article set Id_LRU ='YOURVALUE' where ID_Article like 'DIEPRESTATION' 

試試上面的查詢。

希望這會幫助你。