我的表名爲users
。我有一個名爲ID
和module
的列。使用MySQL的語法我怎麼能說「得到列的ID爲3,更新列模塊從原來的號加1遞增」mySQL select ID編輯列
1
A
回答
2
update users set module = module + 1 where id = 3;
1
"UPDATE users SET module = module + 1 WHERE id=3";
這應該得到你想要的東西。
1
要做到這一點在MySQL:
UPDATE myDB.users SET module = module + 1 WHERE ID = 3
你需要知道如何用PHP做到這一點呢?
2
你的問題不是很清楚,但這是你想要的嗎?!
UPDATE users
SET module = module + 1
WHERE ID = 3;
2
UPDATE users
SET module = module + 1
WHERE ID = 3;
2
UDPATE users
SET module = module + 1
WERE ID = 3
這是什麼,功課? :-)
1
試試這個:
update `users` set `module` = `module` + 1 where `id` = '3';
相關問題
- 1. MySQL和ID手動編輯
- 2. QuickBooks編輯序列ID WebConnector
- 3. Mysql subquery select all id
- 4. MySQL編輯特定列
- 5. MySQL SELECT WHERE id IN function()
- 6. PHP MySQL select * WHERE id => 100
- 7. Mysql select last id vs COUNT(*)
- 8. MySQL的 - SQL SELECT從ID
- 9. MySQL select語句where table1.id!= table2.id
- 10. MYSQL SELECT MAX(ID)+ 1其中id <1000
- 11. 「沒有這樣的列:ID(代碼1):在編譯:SELECT ID ......」
- 12. SELECT ID擁有最多ID的編號
- 13. PHP更新/ MySQL編輯行編輯器
- 14. 編輯mysql表
- 15. MySQL編輯值
- 16. Mysql Select Where Unknown列
- 17. MYSQL SELECT DISTINCT,多列
- 18. 在MySQL中編輯一個包含未知主鍵/列ID的行
- 19. MySQL的id序列
- 20. MySQL Id列
- 21. MySQL列ID號
- 22. MySQL報告 - 編輯
- 23. vscode文本編輯ID
- 24. CK編輯器 - 分配ID
- 25. 編輯xpage通用ID
- 26. jQuery可編輯的ID號
- 27. 編輯獲取由ID
- 28. mysql select遞歸父id錯誤'where子句'中的未知列
- 29. 用於SELECT AVG的MySQL PHP(列)返回資源ID 3
- 30. 爲什麼包含'id'列的peewee放入mysql select查詢中?
那很好,謝謝 – cnotethegr8
是數據庫不區分大小寫? –
最喜歡的:http://stackoverflow.com/questions/153944/is-sql-syntax-case-sensitive –