Picky MySQL

Picky MySQL

am 13.06.2006 00:34:45 von Andy George

$query="SELECT * FROM table where the first name starts with $letter";

How would you do this?

Want all the entries in database, that all the $name starts with "A",
for example...

Re: Picky MySQL

am 13.06.2006 01:17:44 von Mick White

Andy George wrote:

> $query="SELECT * FROM table where the first name starts with $letter";
>
> How would you do this?
>
> Want all the entries in database, that all the $name starts with "A",
> for example...
"SELECT * FROM table where column_name like 'A%'";

Not case-sensitive.
Mick

Re: Picky MySQL

am 13.06.2006 05:20:36 von Andy George

> "SELECT * FROM table where column_name like 'A%'";


....works a treat, cheers muchly...