How can I allow NULL values in MySQL
Posted
by peakUC
on Stack Overflow
See other posts from Stack Overflow
or by peakUC
Published on 2010-04-16T02:16:48Z
Indexed on
2010/04/16
2:23 UTC
Read the original article
Hit count: 282
mysql
I was wondering how can I allow NULL values in the following code below along with keeping WHERE username = '$username'
.
here is the mysql code.
"SELECT *
FROM users
WHERE username = '$username'
AND user_id <> '$user_id'"
I'm trying to check for usernames with the same username but I want all users to have a NULL value if they want.
© Stack Overflow or respective owner