Re: Re: A stupid question...
| From: | liljim | Date: | Mon, 11 Mar 2002 22:46:03 +0000 |
| Subject: | Re: Re: A stupid question... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-88108@lists.php.net to get a copy of this message | ||
You're using the wildcard in the wrong place.
Should be
"like '$letter%'";
Or,
"left(column, 1) = '$letter'";
use a die() and mysql_error() to report problems to the browser:
$result =mysql_query("SELECT * FROM emply_info WHERE LEFT(Lname, 1) =
'$letter' ORDER BY Lname, Fname DESC",$db)
or die("Database error: " . mysql_error());
James
> $result =mysql_query("SELECT * FROM emply_info WHERE Lname ORDER BY Lname,
> Fname
> DESC LIKE'%$letter'",$db);
>
> $letter="a"
>
> That's what I tried.
>
> Chuck