justAnoob Posted May 22, 2009 Share Posted May 22, 2009 I have a table in mysql with a row called name and and row called description.... If I do my homework,, will I be able to create a simple search engine that will search the name and description row for whatever keywords were entered in the search. And then display all the records that had the keywords either in the name or description??? The only reason I ask,, is because I read that the database must be setup properly for a search engine.. Is that true,, or will I be able to do what I want?? Link to comment https://forums.phpfreaks.com/topic/159197-php-mysql-search-engine-question/ Share on other sites More sharing options...
kernelgpf Posted May 22, 2009 Share Posted May 22, 2009 Yeah. $keywords=$_POST['keywords']; $query=mysql_query("select column from table where name IN ('$keywords') OR description in ('$keywords')"); 'keywords' should be a list separated by commas. "fun, name, gone" Link to comment https://forums.phpfreaks.com/topic/159197-php-mysql-search-engine-question/#findComment-839585 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.