-
queries AND OR
hi..
i have a question.
If let say i want to select fields in my database, with the condition of type=articles AND content=%keyword% OR subject=%keyword%
what i want is that i want to choose only entries which type HAS to be = articles AND content or subject, either one or both to contain %keyword%
please help me
when i do
WHERE type ='articles ' and subject like '%".keyword."%' and content like '%".keyword."%' ";
it will return entries where type = article AND subject containing keyword AND content containing keyword
which is different from what i want.
i want to return type=article AND either content or subject containing keyword
please
help
me
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks