selecting first character from a MySQL table

From: Date: Tue, 03 Jun 2003 20:50:45 +0000
Subject: selecting first character from a MySQL table
Groups: php.general 
Request: Send a blank email to php-general+get-150070@lists.php.net to get a copy of this message
Hi, First, let me say many thanks to those who responded to my cron tab question - it's working well now. And now for my next trick ;) I'm looking for more of an opinion here. I'm doing an alphabetical listing of members for this site, I've done a general query of my MySQL table to select all the members, but I was wondering if PHP could select only the first character and display only those members who's name begins with an 'A', 'B', 'C', etc? I know I can do a selective query in MySQL using the LEFT command - but that would mean doing a query for each letter of the alphabet - is there a better way, or shall I start querying away? Thanks -Tim

« previous php.general (#150070) next »