|
-
Nov 3rd, 2002, 12:22 AM
#1
Thread Starter
Frenzied Member
MySQL: ORDER BY?
Hey ya,
U know how places like Yahoo!, Excite, MSN ETC all show their search results "Order of match: Highest possibility first"
etc..
well, how can i do it?
Like if some1 searches "Free PHP Scripts"
Theres a site.
1)
2)
3)
All the best quality PHP Scripts, Free for your own use!
it will return the results:
3 / 1 / 2, since 3 has all the words, 1 has two, and two only has the one..
Is this easy to accomplish or?
i know basic "Order by ID DESC" etc,
But i wanna totally get rid of CGI / Perl scripts, and upgrade the lot on me site to PHP (since it works alot faster, and less "Buggy" from my ex.
Any how, sample codes (as always) would be great
-
Nov 3rd, 2002, 11:16 PM
#2
Stuck in the 80s
There isn't a way to do it using ORDER BY, and through my SQL experience, I can't think of a way that could do it. You're probably going to have to find a way to sort through them using PHP after you've extracted them from the database.
I've seen code before that someone posted in the VB Forums that tells you how much a string is like another string in %. Perhaps if you can find that, we can help you conver it to PHP code.
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
|
Click Here to Expand Forum to Full Width
|