Python keep telling me that I need to insert something in my sql folders,
CREATE TABLE voting_page (
voter_id integer primary key autoincrement,
voter_name varchar(255) NOT NULL,
occupation varchar(255) NOT NULL,
voter_age int(3),
candidate_name varchar(255) NOT NULL
);
This is my sql file, which is already set to have an auto increment
My python file need to insert four which is,
c.execute('''INSERT INTO voting_page VALUES (DEFAULT, :voter_name, :voter_occupation, :voter_age, :candidate_name)''',
{
'candidate_name': candidate_saved,
'voter_name': voter_name_saved,
'voter_occupation': voter_occupation_saved,
'voter_age,': voter_age_saved,
})
sqlite3.OperationalError: table voting_page has 5 columns but 4 values were supplied
I tried using DEFAULT and sqlite3.OperationalError: near "DEFAULT": syntax error