Answer the question
In order to leave comments, you need to log in
SQLITE WHERE not returning anything?
Sqlite base. I wrote queries from python, debugged for a long time, and eventually came to the conclusion that sqlite itself does not return anything. The query I write from the console SELECT task, status FROM todo WHERE id = 1;
does not return anything, but queries like SELECT task, status FROM todo WHERE 1;
this return all records from the table
Here is the table dump
CREATE TABLE todo (id int PRIMARY KEY, task char(100) NOT NULL, status bool NOT NULL);
INSERT INTO todo (task,status) VALUES ('Read A-byte-of-python to get a good introduction into Python',0);
INSERT INTO todo (task,status) VALUES ('Visit the Python website',1);
INSERT INTO todo (task,status) VALUES ('Test various editors for and check the syntax highlighting',1);
INSERT INTO todo (task,status) VALUES ('Choose your favorite WSGI-Framework',0);
Answer the question
In order to leave comments, you need to log in
What about the table structure? Do you have id? is there an entry with id = 1?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question