第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會有你想問的

(1064,“您的SQL語法有錯(cuò)誤; ..在第1行使用正確的語法以在'%s,%s,%s,%s,%s)

(1064,“您的SQL語法有錯(cuò)誤; ..在第1行使用正確的語法以在'%s,%s,%s,%s,%s)

慕的地6264312 2021-06-01 15:17:24
我正在嘗試將數(shù)據(jù)插入到我的 mysql 數(shù)據(jù)庫中,但我總是得到一個(gè)錯(cuò)誤,即參數(shù)有問題,我想將其添加到我的插入語句中,我嘗試了各種解決方案以及帶有 ' s','s'工作正常,它已插入我的數(shù)據(jù)庫中。有沒有人知道什么是錯(cuò)的?謝謝。try:    conn = mysql.connect()    cursor = conn.cursor()    insert_cmd = "INSERT INTO TBTAB VALUES(%s, %s, %s, %s, %s)"    #insert_cmd = "INSERT INTO TBTAB VALUES('s', 's', 's', 's', 's')"    # insert_cmd = "INSERT INTO TBTAB VALUES(?, ?, ?, ?, ?)"    tpa= ("szilva", "barack", "meggye", "alma", "korte")    #cursor.execute("INSERT INTO TBTAB (UserName, Email, TextBoxCont, NodeChosen, CurDate) VALUES ('Caal', 'TomErichsen', 'Svanger', '400esd6', 'Nqdwasorway');")    cursor.execute(insert_cmd.format(tpa))    conn.commit()    return render_template('form.html')except Exception as e:    return str(e)錯(cuò)誤:(1064, "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 '%s, %s, %s, %s, %s)' at line 1")
查看完整描述

1 回答

  • 1 回答
  • 0 關(guān)注
  • 215 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號