lower($search)."%' ";
$sql_result=@mysql_query($sql);
$c=0;
while($result=@mysql_fetch_array($sql_result)){
$c++;
$r.=" ";
for($ii=0;$ii ";
}
$r.=" ";
}
$r.="";
return "$sql Matches: ".$c."".$r;
}
?>
$r.=" ";
for($ii=0;$ii ";
}
$r.=" ";
}
$r.="$sql";
return " Matches: ".$c.$r;
}
?>
----- Original Message -
From: "r.gelstharp" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, May 05, 2001 2:28
$result=mysql_fetch_array($sql_result)){
$r.=" ";
for($ii=0;$ii ";
}
$r.=" ";
}
$r.="";
return $r;
}
echo genData($ID);
- Original Message -
From: "r.gelstharp" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sat
Done like you recommended with the selectlike '%".$var."%' but it still
gives me empty rows of data.
Everytime I try and search for something it returns with 7 rows of data, all
of which are blank. I'm using the basic mysql_num_rows to get the number of
rows of data it retrieves, and I'm usin
Xon
- Original Message -
From: "r.gelstharp" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, May 05, 2001 2:00 AM
Subject: [PHP-WIN] trouble with MySQL 'LIKE' command
> I'm trying to implement a search on my site. When the user enters a
$sql=" name like '%".$name."%' ";
- Original Message -
From: "r.gelstharp" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, May 05, 2001 2:00 AM
Subject: [PHP-WIN] trouble with MySQL 'LIKE' command
>
I'm trying to implement a search on my site. When the user enters a search
string and pressed the Search button it sends the search string into a
cariable I call searchfor, and I then construct a query that goes something
like :
"SELECT FROM WHERE product_name LIKE $searchfor.
now I know t