Is there anyway I can order the results by how relevant they are or is that automatic?
The Royal Ram
Comments
NuvoForum LeaderVPS - Virtual Prince of the Server
Well, depending on how you coded it, the results should be listed accoring to the "ORDER BY" bit of your mySQL query unless you're going for something more complex such searching for individual words and the whole search term (so "I have a hat" would look for "I", "have", "a", "hat" and "I have a hat" but only).
By looking for idividual words, it'd be possible to create search results which list items with more instances of the words in the seach string, but you'd need to know how many instances of a word are present in a body of text.
If you have a field in your table to show how many times people have clicked the links to your articles, you could also list by that (popularity).
Your best bet would be to look up search algorythms in php on google or something...
PHP, CSS, XHTML, Delphi, Ruby on Rails & more. Current project: CMS Object. Most recent change: Theme support is up and running... So long as I use my theme resource loaders instead of that in the Rails plug-in. Release date: NEVER!!!
Comments
By looking for idividual words, it'd be possible to create search results which list items with more instances of the words in the seach string, but you'd need to know how many instances of a word are present in a body of text.
If you have a field in your table to show how many times people have clicked the links to your articles, you could also list by that (popularity).
Your best bet would be to look up search algorythms in php on google or something...
Current project: CMS Object.
Most recent change: Theme support is up and running... So long as I use my theme resource loaders instead of that in the Rails plug-in.
Release date: NEVER!!!
Webmaster-Talk.com
Chroder.com
if `tablename` LIKE %keywords% then dsiplay results...
how would that be changed for relevancy ordering...
The Royal Ram