Current location: Hot Scripts Forums » Other Discussions » Database » MySQL; Search For Most Similar


MySQL; Search For Most Similar

Reply
  #1 (permalink)  
Old 05-14-06, 10:32 AM
cardine cardine is offline
New Member
 
Join Date: May 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
MySQL; Search For Most Similar

I am working on a PHP script, and I want it so it searches a database for something (such as "MySQL is very fun to use"). Now I want it so that if there was no result called "MySQL is very fun to use", then it searches for the most similar entry (such as "MySQL is fun to use" or MySQL is easy to use".) Is that at all possible, and if it is, may somebody explain it to me, or point me to a place that does?

Thanks!

Also I understand basic MySQL (how to do searches, and other simple stuff like that).

Also if this isn't possible, is there any way to reverse wild card (wild card the results instead of the search). This would mean that if you searched for "MySQL is fun and easy to use", then "MySQL is fun" could show up.
Reply With Quote
  #2 (permalink)  
Old 05-14-06, 10:59 AM
mab's Avatar
mab mab is offline
Community VIP
 
Join Date: Oct 2005
Location: Denver, Co. USA
Posts: 2,674
Thanks: 0
Thanked 0 Times in 0 Posts
Take a look at full text searches - http://dev.mysql.com/doc/refman/5.0/...xt-search.html
__________________
Error checking, error reporting, and error recovery. If your code does not have these to get it to tell you why it is not working, what makes you think someone in a programming forum will be able to tell you why it is not working???
Reply With Quote
  #3 (permalink)  
Old 05-14-06, 10:59 AM
Keith's Avatar
Keith Keith is offline
Community Liaison
 
Join Date: Feb 2004
Posts: 1,232
Thanks: 1
Thanked 11 Times in 11 Posts
Sounds like you want to utilize full-text searching. Here's a nice tutorial:
http://www.zend.com/zend/tut/tutorial-ferrara1.php
Reply With Quote
  #4 (permalink)  
Old 05-14-06, 11:00 AM
NeverMind's Avatar
NeverMind NeverMind is offline
Community VIP
 
Join Date: Aug 2003
Location: K.S.A
Posts: 2,257
Thanks: 0
Thanked 2 Times in 1 Post
Moved to the appropriate forum.

as for your question, full text search is the answer, some tuts:
http://www.devarticles.com/c/a/MySQL...-Capabilities/
http://www.phpfreaks.com/tutorials/129/0.php
http://www.zend.com/zend/tut/tutorial-ferrara1.php

edit: wow! 3 posts in 2 minutes all with the same answer
__________________
PHPSimplicity
We don't need a reason to help people - Zidane [FF9]

Last edited by NeverMind; 05-14-06 at 11:02 AM.
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Useful MySQL Resources ptesone Database 30 02-23-11 08:28 AM
PHP and MySQL ? rob2132 Hot Scripts Forum Questions, Suggestions and Feedback 4 08-29-08 02:22 AM
MySql Labyrinth moron Database 4 02-22-08 02:46 AM
Hi & Myphpadmin getting started help php_guru_besar New Members & Introductions 4 03-19-06 11:06 PM
UPDATE: MySQL Auto Backup & Export v1.1 Beyonder General Advertisements 2 03-21-05 02:05 PM


All times are GMT -5. The time now is 04:52 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.