Jonas Sandman <[EMAIL PROTECTED]>
wrote:
Data.artist LIKE (SELECT '%' || ? || '%') OR Data.album LIKE (SELECT
'%' || ? || '%') OR Data.genre LIKE (SELECT '%' || ? || '%') OR
Data.comment LIKE (SELECT '%' || ? || '%') AND Data.path LIKE
(SELECT

You have AND here, while elsewhere you have OR. Is it intentional?


Yes, path is most important. I am searching for some mp3-files in
different folders. I am looking for
C:\MP3\Albums and don't want C:\MP3\Singles to show up in the results
(they do)

They do? Didn't you say that the moment at least one parameter is a non-empty string, you get no results? I'm confused.

Be aware that AND has higher precedence than OR. Your condition is interpreted as

title like x1 OR
artist like x2 OR
album like x3 OR
genre like x4 OR
(comment like x5 AND path like x6)

which apparently is not the effect you were shooting for. You probably want

(title like x1 OR artist like x2 OR album like x3 OR genre like x4 OR comment like x5)
    AND path like x6

Use parentheses to achieve this result.

If I set query to anything, I receive NO results.

Show a sample of the data in the table, and a set of parameters you
bind.


An example is path = "C:\MP3\Madonna\Like a virgin.mp3", the title,
artist etc are empty or 0.

What do you mean "empty or 0"? Binding integer 0 is not the same thing as binding an empty string.

You do in fact have a row in Data table where Data.path = 'C:\MP3\Madonna\Like a virgin.mp3', right?

Igor Tandetnik

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to