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
#1
i want to find the value of 'vazn' (one column of sql table) where 'id' column is equal to f1.
f1 is a variable as following:
f1=int(enter3.get())
enter3 is an entry.
i entered the variable in enter3 that is equal to one of the existing 'id's in the sql table('bills')
this is my code:

Output:
[self.cur.execute("SELECT vazn FROM billse WHERE id1='f1'")                 vaznp = self.cur.fetchall()                 print(vaznp)][/python] i get 'null' when it prints vaznp
why?????
please helpppp Sick
Reply


Messages In This Thread
which column of sql table is equal to a variable - by gray - Mar-13-2017, 11:01 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Column headers not aligning properly with table kenwatts275 3 3,537 Jul-13-2020, 12:53 AM
Last Post: menator01
  updating a field of sql table from a variable gray 1 3,558 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