(Aug-19-2017, 05:09 PM)ichabod801 Wrote: The error is in the first line. Since you changedprogram_id = ?
toprogram_id is NULL
, you don't need program_id in the second argument. That is, you took out where you were placing the thing (the ?), but you didn't take out what you were placing (program_id).
You have got it wrong there, I need to use program_id as a second argument because I am getting the value from the button object in each time when I get the value so I need to use it.
By the way, I try to use this:
cur.execute('SELECT program_id FROM programs WHERE program_id is NULL and channel=?;', (channel,)) if data is None: print "Now you are working on it........................." else: print "You won't do anything........................"It did not look up for the NULL data above of the value in a database in the same row as the channel when I am trying to use the channel variable to find the channel name in the same rows as the value.
If you are not sure what I am trying to do, please see the screenshots:
http://i.imgur.com/nwJGog8.png
http://i.imgur.com/hoe62gt.png
I want to find the value
3001
, then look up of the null data in the same rows as the channel BBC ONE
before I would do something. If there is no null data above of the value 3021
in the same rows as the channel ITV
then I won't do something. I hope you get my point?