Page 1 of 1

PHP search

Posted: Mon May 19, 2003 4:10 pm
by dazz1
ive tried FULLTEXT it it isnt what i wanted to get working, with my non fulltext search script let's say i search for:

super man

results liked super_man, super.man, ect... Don't show up, only results with super and man in them

but with FULLTEXT i search for super man I get results with the query super.man, super_man in them, BUT i also recieve result with super in them and not man

kinda hard to understand, is there a way i could use normal searching (non fulltexT) and make it so if somone searches for super man they receive results with super.man super0man, super-man
ect..

please help out...

Posted: Mon May 19, 2003 7:22 pm
by McGruff
SELECT col1, col2, ..etc FROM table WHERE search_this_column LIKE '%super%' OR search_this_column LIKE '%man%'

Posted: Mon May 19, 2003 7:32 pm
by AVATAr
are you using mysql? As of Version 4.0.1, MySQL can also perform boolean full-text searches using the IN BOOLEAN MODE modifier.

check this out: http://www.mysql.com/doc/en/Fulltext_Search.html