Skip to main content
Stack Overflow
  1. About
  2. For Teams

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

SQLite3 Unknown Error

I am Using python3.

self.cur.execute("""INSERT or IGNORE INTO {0}(Konu, KonuAnlatımı, SoruSayısı, ToplamDogru, ToplamYanlıs) VALUES
 ('{1}', '{2}', '{3}','{4}', '{5}') UPDATE {0} SET (KonuAnlatımı = '{2}'),
 SoruSayısı = '{6}',
 TaplamDogru = '{7}',
 ToplamYanlıs = '{8}'
 WHERE Konu = {1}""".format(ders, konu, Çalışıldı, soru, dogru, yanlis,
 str(int(soru) + int(self.cur.execute(
 "Select SoruSayısı From "+ders+" WHERE Konu = '"+konu+"'").fetchone()[0])),
 str(int(dogru) + int(self.cur.execute(
 "Select ToplamDogru From "+ders+" WHERE Konu = '"+konu+"'").fetchone()[0])),
 str(int(dogru) + int(self.cur.execute(
 "Select ToplamYanlıs From "+ders+" WHERE Konu = '"+konu+"'").fetchone()[0]))))

I get an errow which is :

"Select ToplamYanlıs From "+ders+" WHERE Konu = '"+konu+"'").fetchone()[0]))))

sqlite3.Warning: You can only execute one statement at a time.

if I delete ';' I get this:

"Select ToplamYanlıs From "+ders+" WHERE Konu = '"+konu+"'").fetchone()[0]))))

sqlite3.OperationalError: near "UPDATE": syntax error

So what is happening? And I haven't find the title name. sorry...

Answer*

Draft saved
Draft discarded
Cancel

default

AltStyle によって変換されたページ (->オリジナル) /