Re: [PHP-WIN] trouble with MySQL 'LIKE' command

2001-05-05 Thread PHPWIN
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; } ?>

Re: [PHP-WIN] trouble with MySQL 'LIKE' command

2001-05-05 Thread PHPWIN
$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

Re: [PHP-WIN] trouble with MySQL 'LIKE' command

2001-05-05 Thread PHPWIN
$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

Re: [PHP-WIN] trouble with MySQL 'LIKE' command

2001-05-04 Thread r.gelstharp
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

Re: [PHP-WIN] trouble with MySQL 'LIKE' command

2001-05-04 Thread PHPWIN
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

Re: [PHP-WIN] trouble with MySQL 'LIKE' command

2001-05-04 Thread PHPWIN
$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 >

[PHP-WIN] trouble with MySQL 'LIKE' command

2001-05-04 Thread r.gelstharp
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