Re: Still not - Display data begin with "A"
| From: | Joe Brown | Date: | Sun, 08 Apr 2001 05:18:05 +0000 |
| Subject: | Re: Still not - Display data begin with "A" | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-8350@lists.php.net to get a copy of this message | ||
Put the percent symbol inside of the single quotes:
$result = mysql_query("SELECT * FROM mydata WHERE name like '$begin%'
",$db);
"Naga Sean" <nagasea@kaskus.com> wrote in message
news:20010408051607.609993ECC@sitemail.everyone.net...
> It still not working
> I want to get the result of people with the first later is "A" in my
database
>
> Here is my syntax :
>
> $result = mysql_query("SELECT * FROM mydata WHERE name like
'$begin'%",$db);
>
> the $begin is from the URL link
>
> www.sample.com/name?begin=a
>
>
> Thanks
>
>
> --- "Frank M. Kromann" <frank@frontbase.com>
> > wrote:
> >wyoy could use a SQL statement like this:
> >
> >select * from myTable where LastName like "A%"
> >
> >- Frank
> >
> >> Guys,
> >>
> >> How to view the result from the table.
> >> If I only want to display persons begin with letter A in the front.
> >>
> >>
> >>
> >> _____________________________________________________________
> >> www.kaskus.com - FREE EMAIL SERVICE
> >>
> >> --
> >> PHP Database Mailing List (http://www.php.net/)
> >> To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
> >> For additional commands, e-mail: php-db-help@lists.php.net
> >> To contact the list administrators, e-mail:
php-list-admin@lists.php.net
> >>
> >>
> >>
>
> _____________________________________________________________
> www.kaskus.com - FREE EMAIL SERVICE
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
> For additional commands, e-mail: php-db-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>