Re: [PHP] selecting first character from a MySQL table

2003-06-05 Thread David Robley
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] says... > 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

RE: [PHP] selecting first character from a MySQL table

2003-06-04 Thread Jay Blanchard
How about a substring comparison? Select all from your database and then loop through using an array of the alphabet. [NOT TESTED] $alpha_array = array("A","B","C", ); $alpha_count = count($alpha_array); for($i=0; $i<$alpha_count; $i++){ $sql = "SELECT name FROM table WHERE LEFT(nam