How do i implement this if my user enter query such as this: "mp3, flv, mp4". Usually, in my database, query will be made to a field that match phrase like this "mp3, flv, mp4". Now i want to enhance it by enable searching to a field that match word "mp3" or "flv" or "mp4". When I perform this using "OR" operator, the result have redundance and repeated data. Can someone show me the exact way. If you can show how google return data, would be appreciated
advance query to database
Moderator: General Moderators
advance query to database
I have a form where one text and one button displayed to perform searching in my database. I want to perform searching not just based on the phrase provided by user but also like to perform search for every single word provided by user.
How do i implement this if my user enter query such as this: "mp3, flv, mp4". Usually, in my database, query will be made to a field that match phrase like this "mp3, flv, mp4". Now i want to enhance it by enable searching to a field that match word "mp3" or "flv" or "mp4". When I perform this using "OR" operator, the result have redundance and repeated data. Can someone show me the exact way. If you can show how google return data, would be appreciated
How do i implement this if my user enter query such as this: "mp3, flv, mp4". Usually, in my database, query will be made to a field that match phrase like this "mp3, flv, mp4". Now i want to enhance it by enable searching to a field that match word "mp3" or "flv" or "mp4". When I perform this using "OR" operator, the result have redundance and repeated data. Can someone show me the exact way. If you can show how google return data, would be appreciated
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Re: advance query to database
You could do something like "WHERE RIGHT(filename, 3) IN ('mp3', 'mp4', 'flv')".
(#10850)