Picky MySQL

$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...
Andy George [ Di, 13 Juni 2006 00:34 ] [ ID #1352350 ]

Re: Picky MySQL

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
Mick White [ Di, 13 Juni 2006 01:17 ] [ ID #1353739 ]

Re: Picky MySQL

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


....works a treat, cheers muchly...
Andy George [ Di, 13 Juni 2006 05:20 ] [ ID #1353740 ]
PHP » alt.php.sql » Picky MySQL

Vorheriges Thema: How to use PHP to execute a file of SQL commands
Nächstes Thema: PHPlist specific: SELECTing all attributes for some members of a specific list