near ",": syntax error - select query in sqlite3 - python -


i trying select data sqlite data base using python , facing error:

near ",": syntax error

table structure:

create table schedule ( game_week text not null, hteam   text, ateam   text, gdate   text,  gtime   text,  gtvstn  text ); 

there unique rows each select statement.

my code:

if (choice == "y" or choice == 'y'):         print("please enter game week, home , away team")         gme_week = input("enter game week")         hm_team = input("enter home team")         aw_team = input("enter away team")          cur.execute('''select * schedule (game_week, hteam, ateam,) values (?, ?, ?)''',                     ( gme_week, hm_team, aw_team)) // code failing                                  try:             row = cur.fetchone()             print (row)         except:             print ("row not found! check values once , try again!") 

i new python , dont know sqlite syntax in python. using python 3.5 , sqlite3

can please me out?

many in advance

the correct sql-statement is:

select * schedule game_week = ? , hteam = ? , ateam = ? 

Comments

Popular posts from this blog

authentication - Mongodb revoke acccess to connect test database -

r - Update two sets of radiobuttons reactively - shiny -

ios - Realm over CoreData should I use NSFetchedResultController or a Dictionary? -