Re: reading records alphebetically
| From: | Julia A. Case | Date: | Sat, 30 Jun 2001 18:11:34 +0000 |
| Subject: | Re: reading records alphebetically | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-55679@lists.php.net to get a copy of this message | ||
Try using a query like
select * from table_name where name like '$letter%';
Julia
Quoting Jamie Saunders (jamie.s@btinternet.com):
> Hi,
>
> I have a MySQL database set-up containing a few hundred records. I'm trying
> to make a script that reads the 'name' field of the records and displays
> only the records of which the name field begins with a specific letter:
>
> if ($letter = A) {
> display all records of which field 'name' beings with A
> } else if ($letter = B) {
> ...
>
> I'm just starting out on this, so please excuse my ignorance :)
>
> Jamie Saunders
> jamie.s@btinternet.com
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
--
[ Julia Anne Case ] [ Ships are safe inside the harbor, ]
[Programmer at large] [ but is that what ships are really for. ]
[ Admining Linux ] [ To thine own self be true. ]
[ Windows/WindowsNT ] [ Fair is where you take your cows to be judged. ]