Andras Kende wrote:
I would like to do the following:

============
mysql db:

andrew
anthony
joe
janice
john
simon
============

sql_query ( select names .....

============

I would need only the distinct first character from the query
result would be: a,j,s

I think maybe its REGEXP but never did it before...

Thanks!!

Andras Kende


Try the query (no REGEXP):

SELECT DISTINCT SUBSTRING(names,0,1) FROM .....

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



Reply via email to