Re: Selecting Null columns

From: Date: Thu, 22 Apr 2004 06:21:15 +0000
Subject: Re: Selecting Null columns
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-34032@lists.php.net to get a copy of this message
Maybe it is not null but has empty content? the first statement is correct try >> SELECT * FROM questions WHERE (answer IS NOT NULL OR answer<>''); or maybe >> SELECT * FROM questions WHERE LENGTH(answer)>0; ----- Original Message ----- From: "Pambos Nicolaou" <pambos_15@hotmail.com> To: <php-db@lists.php.net> Sent: Thursday, April 22, 2004 7:11 AM Subject: [PHP-DB] Selecting Null columns Hi everyone I am a new user of this mail list and I hope that it will be helpful. I am trying to show the content of a MySQL table(raw) where the content of a column is NOT NULL. I used the commands below but the result shows the content of the whole table for the first case and nothing in the second case. >> SELECT * FROM questions WHERE answer IS NOT NULL ; >> SELECT * FROM questions WHERE answer <> NULL ; Thanks in advance Nicolaou Pambos _________________________________________________________________ Help STOP SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.db (#34032) next »