Using a wildcard so all records will be matched.
My code:
if(empty($tag))
{
$tag="%";
}
mysql_query("select * from mytable where instr(tag,'$tag')>0") or die(mysql_error());
But it returns zero result. Even if
if(empty($tag))
{
$tag="*";
}
It still returns zero result. How to resolve this problem?