I know how to store data into a database if I know the value of what I am storing. For example:

sql="INSERT INTO nameDatabase (name) Values('Joe')"

However, I want to be able to store data that I do not know the value of into my database. So I can prompt the user for the name of something and then store that into my database.

I tried to put the variable into Values but I received an error.

sql="INSERT INTO nameDatabase (name) Values(name)"

error was "no such column: name"

So how can I do this?

I figured it out.

self.cursor.execute('INSERT INTO nameDatabase VALUES (null,?)',[Name])