Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
MYSQL Fulltext Searching
Old 05-23-2010, 09:42 AM MYSQL Fulltext Searching
evans123's Avatar
Ultra Talker

Posts: 468
Trades: 0
I have this query looking for "php" in my table but it doesnt return any results and i know that php exists in my table whether its on its own or in a string.

PHP Code:
$sql2 mysql_fetch_array(mysql_query("SELECT * FROM search_engine__information WHERE MATCH(url) AGAINST ('php')"));
echo 
"" $sql2[0] . ""
can anyone tell me where im going wrong?
evans123 is offline
Reply With Quote
View Public Profile Visit evans123's homepage!
 
 
Register now for full access!
Old 05-23-2010, 11:02 AM Re: MYSQL Fulltext Searching
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,384
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
No idea do you have an index set up as "FULLTEXT"

Are the tables MyIsam and are the field types suitable for full text searching.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 05-23-2010, 11:42 AM Re: MYSQL Fulltext Searching
evans123's Avatar
Ultra Talker

Posts: 468
Trades: 0
i managed to get it to work but it just returned full matches and not likes so ill have to try something else.
evans123 is offline
Reply With Quote
View Public Profile Visit evans123's homepage!
 
Old 05-24-2010, 12:31 AM Re: MYSQL Fulltext Searching
Novice Talker

Posts: 5
Name: Bilal Tahir
Trades: 0
You can also try LIKE '%$Var%' Type. I hope that can Easily Solve your problem
cbtahir2001 is offline
Reply With Quote
View Public Profile
 
Old 05-24-2010, 01:43 AM Re: MYSQL Fulltext Searching
Average Talker

Posts: 15
Name: Gordon
Trades: 0
Fulltext searching is for matches, as you say. Also I believe the default min length for a MATCH search is 4 characters, searching for dog (3 characters) doesn't work, but doggy (5 chars) will.

Look at lucene/solr if you want a decent search that will easily match things like doggies when people search for dogs. etc.

http://lucene.apache.org/solr/
__________________
Gordon Page [
Please login or register to view this content. Registration is FREE
]

Please login or register to view this content. Registration is FREE
gordonrp is offline
Reply With Quote
View Public Profile
 
Old 05-27-2010, 04:24 PM Re: MYSQL Fulltext Searching
Average Talker

Posts: 20
Trades: 0
Gordonrp, I second that.. I am using Solr, and setting up many clients on it who are doing full text search.. That goes for users of MySQL and MS SQL.. It's an awesome option.
__________________

Please login or register to view this content. Registration is FREE
- Awesome Price, Awesome Support, Awesomely Awesome...


Please login or register to view this content. Registration is FREE
- Web Development, E-Commerce, SEO, SMM, CMS's
holmessph is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to MYSQL Fulltext Searching
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.16624 seconds with 12 queries