0

I have created a SQLite query in PHP which queries user input and checks it against the database, however when I run the query it just displays everything in the database. and if I was trying to figure out a way for it to not return anything if the user value is null the query is below.

The ISBN can be returned and so can the Category nothing else works.

SELECT * from Books  WHERE ISBN = '$strISBN' OR Author LIKE '$$strAuthor$' OR Title LIKE '$$strTitle$' OR Publisher LIKE '$$strPublisher$' OR  Category = '$strCategory'

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.