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
or. $sql="...like '%$name%'"; note $sql="."; and not '..'; double not single in double quotes your $name is evaluated otherwise you close the string append your variable then apend the rest of the string get wat I mean? Xon - Original Message - From: "r.gels

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 > I'm trying to implement a search on my site. When the user enters a