Jump to content

Simple Search Engine


Dysan

Recommended Posts

If you're looking for a more simple search engine try this:

 

$query = "SELECT `field1`, `field2`, `field3` FROM `dbtable` WHERE `field1` LIKE '%$search_str%' OR `field2` LIKE '%search_str%' OR `field3` LIKE '%search_str%'";
$run = mysql_query($query);
while($arr = mysql_fetch_assoc($run)){
   extract($arr);
   echo "$field1 $field2 $field3<br />";
}

 

This is obviously much more basic.  But if you're just trying to create a simple search engine it would do the trick  ;)

Link to comment
https://forums.phpfreaks.com/topic/83287-simple-search-engine/#findComment-423768
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.