3
Contributors
4
Replies
5
Views
7 Years
Discussion Span
Last Post by raju_boini525
0
$query = mysql_query("SELECT * FROM `products` WHERE `name` LIKE '%$s1%' AND  `functions` LIKE '%$s3%'");
0
$query = mysql_query("SELECT * FROM `products` WHERE `name` LIKE '%$s1%' AND  `functions` LIKE '%$s3%'");

I tried this (Thanks BTW) and it didn't return the result it should have. Not sure if that query type works, I read somewhere on the Internet that it may involve JOIN or GROUP something, i personally have never heard of them :D

0
if(($name!="")&(isset($name))&($name<>"select")) 
		{
			$condition=$condition."namelike '%$name%' and ";
		}
		if(($function!="")&(isset($vptype))ype<>"select")) {
			$condition=$condition."function like '%$function%' and ";
		}
if(($description!="")&(isset($description))ype<>"select")) {
			$condition=$condition."description like '%$description%' and ";
		}
		$condition=substr($condition,0,-4);

mysql_query("select * from tablename where (".$condition.")");

try like this. it will help you.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.