I have created a database like this: CREATE TABLE Data (path VARCHAR(512) PRIMARY KEY, title VARCHAR(512), artist VARCHAR(512), album VARCHAR(512), length INTEGER, genre VARCHAR(512), comment VARCHAR(512), track INTEGER, year INTEGER, bitrate INTEGER, playcount INTEGER, changed INTEGER, size INTEGER, tagged INTEGER);
and then I want to select only certain elements from it. I've made this select: SELECT * FROM Data WHERE Data.title LIKE (SELECT '%%' || ? || '%') OR Data.artist LIKE (SELECT '%' || ? || '%') OR Data.album LIKE (SELECT '%' || ? || '%') OR Data.genre LIKE (SELECT '%' || ? || '%') OR Data.comment LIKE (SELECT '%' || ? || '%') AND Data.path LIKE (SELECT ? || '%');" which I feed sqlite3_prepare16 then I bind a query to the first five texts and then the path (it's a mp3-library) to the sixth ? I still always retrieve ALL data in the database if query is empty. If I set query to anything, I receive NO results. Anyone know what's wrong? Regards, Jonas