Re: mysql regexp select questions
| From: | Eli | Date: | Fri, 08 Apr 2005 04:06:48 +0000 |
| Subject: | Re: mysql regexp select questions | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-212614@lists.php.net to get a copy of this message | ||
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 KendeTry the query (no REGEXP): SELECT DISTINCT SUBSTRING(names,0,1) FROM .....