Unknown column '' in 'field list'
生活随笔
收集整理的這篇文章主要介紹了
Unknown column '' in 'field list'
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
Unknown column ‘’ in ‘field list’ 解決辦法
正確寫法:cursor.execute("update book set name='%s' where id=%d" % (name, int(id))) 錯誤寫法:cursor.execute("update book set name=%s where id=%d" % (name, int(id)))你要獲取字符串接收方式是
'%s'要獲取整形數字
int(id)
其他原因
多了一個空格
https://blog.csdn.net/gnail_oug/article/details/53606608
總結
以上是生活随笔為你收集整理的Unknown column '' in 'field list'的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 女性宫颈性不孕的症状有哪些
- 下一篇: TP框架中的模型获取表单中的值??