On Mon, Oct 20, 2014 at 1:04 PM, Juan Christian <juan0christ...@gmail.com> wrote: > Ok, new code using ?:
I suspect you meant to post this to some other thread. > def get_db(_id): > cursor = db.execute("SELECT ID, URL, AUTHOR, MESSAGE FROM TOPICS WHERE ID = > ?", (_id)) > return cursor.fetchone() (_id) is not a tuple; it's just a parenthesized variable name. To create a one-element tuple you need a trailing comma: (_id,) Remember that with the exception of the empty tuple (), tuples are created by commas, not parentheses. -- https://mail.python.org/mailman/listinfo/python-list