php mysql searching question?

  • Thread starter Thread starter Ryan
  • Start date Start date
R

Ryan

Guest
i have a database that contains a lot of titles like
"this.is.a.title"
is there an easy to explain way or available php code to allow searching for this with just "this is a title" and no periods?

currently only searching exactly this.is.a.title returns the result im looking for, searching "this is a title" doesnt return anything

hope that makes some sense
 
I would suggest that you make use of MySQL's Full Text Search functionality, more detail on which is available here:
http://dev.mysql.com/doc/refman/5.1/en/fulltext-search.html

Aside from that, your only option is to take each word in the search string (separating by spaces) and perform a search using the strpos() function in PHP. However this is far more complex and process intensive than the MySQL method!
 
Back
Top