Forum Moderators: rogerd

Message Too Old, No Replies

MySQL select Non Alphabetic usernames?

Select usernames FROM table LIKE '?'

         

KenvdBroek

11:47 am on Jun 23, 2005 (gmt 0)

10+ Year Member



Hi there,

Can someone explain me how I can show all usernames which are non alphabetic?

Example username:!MISTERNICE!

I'm building a community and need this to show all usernames.

I already have this script:

$sql = mysql_query("SELECT * FROM members WHERE username LIKE '$letter%' ORDER BY username DESC");

Kind regards,

K.

arran

12:35 pm on Jun 23, 2005 (gmt 0)

10+ Year Member



You'll probably have to use REGEXP. Something like:

SELECT not (username REGEXP '[[:alpha:]]+') from members;

It's been a while since I used REGEXP, not sure about the syntax.