that is a seriously bad way to filter results when dealing with a database. it might seem fast and efficient with a small table, but when you have hundreds or thousands of records you will notice how slow it is.
now, to use wild cards correctly, you need to use the LIKE operator (rather than "="). this will also always be a case insensitive search. you can build your SQL statement like so:
hope that helps.Code:SELECT * FROM table WHERE title LIKE '%book%'




Reply With Quote