Try

Select blah from blah where blah like '$letter%'

% is wildcard after first letter

Regards.....

---------------------------------------------------------------------------
Chris Kay
Technical Support - Techex Communications 
Website: www.techex.com.au   Email: [EMAIL PROTECTED]
Telephone: 1300 88 111 2 - Fax: (02) 9970 5788 
Address: Suite 13, 5 Vuko Place, Warriewood, NSW 2102 
Platinum Channel Partner of the Year - Request DSL - Broadband for Business
---------------------------------------------------------------------------

> -----Original Message-----
> From: DL Neil [mailto:[EMAIL PROTECTED]] 
> Sent: Monday, 19 August 2002 8:43 AM
> To: Tony Harrison
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP] Find rows by 1st letter in MySQL
> 
> 
> Tony,
> 
> > How would I go about selecting rows from a MySQL table 
> where the first 
> > letter of a certain field is $letter ?
> 
> 
> Depends upon the MySQL tbl's schema.
> The MySQL online manual discusses wildcards (full text). 
> Alternatively see LEFT() and other string functions that can 
> be used in SELECT and WHERE clauses.
> 
> Regards,
> =dn
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to