Results 1 to 3 of 3
Jan 2, 2010, 19:00 #1
How to replace the return value of select?
I know mysql has such function, but I can't find it.
Let's say I have a column of type enum and it stores one of 3 possible values:
'A', 'D', or 'U'
What I want to do is the result of select to return either A or D or NULL instead of U
basically this is an accecc control value -A for allow, D for deny and U for undefined. But I want the undefined to be returned as null
Let's call my column 'access_control'
so how should I write a select access_control from USER_GROUP?
I hope someone knows exactly how to do this.My project: Open source Q&A
(similar to StackOverflow)
powered by php+MongoDB
Source on github, collaborators welcome!