Python Forum
which column of sql table is equal to a variable
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
which column of sql table is equal to a variable
#7
ok.my problem was solved...but i have a new problem..please help again...i want to add **vazne** into another table(it maeans **vazne** will becomes one of the the second table columns )...when i print **vazne** , it returns correct value but as this format : [(360,)]...so when i add it into the second table,

i get the following error
Exception in Tkinter callback
Traceback (most recent call last):
File "/usr/lib/python3.4/tkinter/__init__.py", line 1536, in __call__
return self.func(*args)
File "/home/pi/start/gui/jus-submeno-image-refreshh.py", line 609, in tozin2
self.whtable()
File "/home/pi/start/gui/jus-submeno-image-refreshh.py", line 645, in whtable
c.execute("INSERT INTO billsf (vaznf, id1, firs1,las1, yekdo, vaznemp) VALUES (?, ?, ?, ?, ?, ?)",(counter, f1, d1, e1, yord, vazne))
sqlite3.InterfaceError: Error binding parameter 5 - probably unsupported type.

**billse** is the first table...**billsf** is the second table... **vazne** is selected based on 2 items in the first second...after calling **vazne** from the first table, it shoud be added to the second table(**billsf**)
Reply


Messages In This Thread
RE: which column of sql table is equal to a variable - by gray - Mar-15-2017, 07:58 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Column headers not aligning properly with table kenwatts275 3 3,621 Jul-13-2020, 12:53 AM
Last Post: menator01
  updating a field of sql table from a variable gray 1 3,612 Mar-19-2017, 06:38 PM
Last Post: nilamo

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020