Jump to content

problem with my search engine...


AviNahum

Recommended Posts

hey (sorry for very poor English... i from Israel)

i tried to make a search engine to my website...

but i got a problem...

when i typing something in English its works...

but my web in Hebrew (i from Israel)

and when i typing something in Hebrew its don't find anything...

and its don't showing any errors...

this is my php code:

$search=$_GET['search'];
$where_to_search=$_GET['where_to_search'];

if($where_to_search=='downloads') {

	$query="SELECT * FROM `web_downloads` WHERE title LIKE '%$search%' AND depiction LIKE '%$search%' ORDER BY id DESC";
	$relust=mysql_query($query);
	while ($r=mysql_fetch_assoc($relust)) {

		if ((mysql_num_rows($relust))==0) {

			echo "no results";
		}

		else {

			echo $r['title'];

		}



	}
}

elseif ($where_to_search=='articles') {

$query="SELECT * FROM `web_articles` WHERE title LIKE '%$search%' AND depiction LIKE '%$search%' ORDER BY id DESC";
$relust=mysql_query($query);
while ($r=mysql_fetch_assoc($relust)) {

	if ((mysql_num_rows($relust))==0) {

			print "no results";
		}

		else {

			echo $row['title'];

		}

	}
}

 

thanks!

Link to comment
https://forums.phpfreaks.com/topic/136465-problem-with-my-search-engine/
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.