View Single Post
Old 08-15-2009, 01:53 PM   #4 (permalink)
JaoudeStudios
The Acquainted
 
JaoudeStudios's Avatar
 
Join Date: Jul 2009
Location: Surrey
Posts: 105
Thanks: 1
JaoudeStudios is on a distinguished road
Default

Well you could run this query 26 times - but I wont recommend it.

You have a few options:
- (MYSQL) You could use a stored procedure
- (MYSQL) Use CASE & CONCAT in mysql
- (PHP) Loop each result and substr the 1st letter and append an array accordingly

The php option is probably the simplest to implement but maybe not the most efficient.
__________________
JaoudeStudios.com | JaoudeStudios.com Forum | JaoudeStudios.com Blog
OpenSource is the road ahead...!
JaoudeStudios is offline  
Reply With Quote