NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page search functions in php

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.

Advanced Search


Closed Thread
 
LinkBack Thread Tools
Old 10-30-2007, 01:54 AM THREAD STARTER               #1 (permalink)
Account Closed
 
shahzad11's Avatar
Join Date: Nov 2006
Location: Lahore
Posts: 297
shahzad11 is on a distinguished road
 



search functions in php


please let me solve my search query problem

when i use Where Clause in php query it returns meabsolute Result

but i wanna use funtion as

my keyword is Free Scripts
and it will return matches for either Free or [COLOR=RED]Scripts[/RED]


thanks in advance to all my helpers
shahzad11 is offline  
Old 11-01-2007, 02:25 AM   #2 (permalink)
New Member
Join Date: Oct 2007
Posts: 8
smagik is an unknown quantity at this point
 



try using match in your query, of course to do that you will need to make the database field fulltext

$sql="SELECT * FROM cheats WHERE MATCH(content) AGAINST ('$keyword')";

As I said, match can only be used on fields that are fulltext.
smagik is offline  
Old 11-01-2007, 04:50 AM THREAD STARTER               #3 (permalink)
Account Closed
 
shahzad11's Avatar
Join Date: Nov 2006
Location: Lahore
Posts: 297
shahzad11 is on a distinguished road
 



will this return results matching one of the word in my keywords?
shahzad11 is offline  
Old 11-01-2007, 03:47 PM   #4 (permalink)
New Member
Join Date: Oct 2007
Posts: 8
smagik is an unknown quantity at this point
 



Most definitly, match is designed for this purpose, of course you will need to structure your sql appropriatly

$sql="SELECT * FROM cheats WHERE MATCH(content) AGAINST ('$keyword')
and MATCH(content) AGAINST ('$keyword2')";

to match the field content against the values of the 2 keywords.

There are stop words using match, I would suggest checking the PHP manual for more info.
smagik is offline  
Closed Thread


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


Liquid Web Smart Servers  
All times are GMT -7. The time now is 09:10 AM.

Managed Web Hosting by Liquid Web
Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger