Hi all i want to build a search query for a database that holds music information. Here is all the fileds :
Note: all feilds in one table!
I created this query :
Thre is one edit box with a submit button that allow user to type and this script gets the search word.
Could an expert tell me if this is powerfull enough or is there is any better way to build search method that allow user to get good search results. Should i just keep adding OR and use like % for all fields in my talbe ? I want the user also to be able to type mutiple words in search box .My whole intention is that user be able to find what they look for.I be happy if an expert give me some suggestion and queries.Thanks
Note: all feilds in one table!
Code:
filename|artist|album|title|track|comments|genre|seconds|filesize|bitrate
Code:
$query = "select id,artist,track,album,title from files where title like '%$s%'OR album like '%$s%' OR artist like '%$s%'order by track";
Thre is one edit box with a submit button that allow user to type and this script gets the search word.
Could an expert tell me if this is powerfull enough or is there is any better way to build search method that allow user to get good search results. Should i just keep adding OR and use like % for all fields in my talbe ? I want the user also to be able to type mutiple words in search box .My whole intention is that user be able to find what they look for.I be happy if an expert give me some suggestion and queries.Thanks