PDA

View Full Version : How to find empty field in query


Tien
8-24-06, 06:57 PM
what the claw should be in order for the query to not return any field in the table that is empty.

For example

table1 has field 'member_name' and 'color_names'

How do I do a query that it will not return any member_name that doesn't have a color?

I tried to use a query below but it doesn't seem to work

mysql_query("SELECT member_name FROM table1 WHERE table1.color_names !=null ");

mitchind
8-25-06, 12:45 PM
Is Not Null

rkoons
8-25-06, 05:49 PM
mysql_query("SELECT member_name FROM table1 WHERE table1.color_names IS NOT NULL ");