I am run into a roadblock trying to use the ? place holder.
date_sql = '''SELECT cost FROM Finance WHERE date BETWEEN ( ? ) AND ( ? )'''
month_price = [t[0] for t in cur.execute(date_sql, ( fd, dateadd) )]
Usually its done ( ?, ? ), (var1, var2).
Is it possible to do it as in the code above? I'm returning 0 values for month_price so I assume it's not placing the variables correctly.
Thanks
Aucun commentaire:
Enregistrer un commentaire