Re: Finding records with NULL values
| From: | Billy S Halsey | Date: | Tue, 26 Feb 2002 22:31:41 +0000 |
| Subject: | Re: Finding records with NULL values | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-17315@lists.php.net to get a copy of this message | ||
Hi Robin,
Use a standard select like you normally would, and in your where clause, use "where [field] is null" :
select field1[, field2, ...] from table1[, table2, ...] where fieldx is null [...]
-bsh
Robin McKenzie wrote:
I have a table of questions, and a table of responses (initially empty) which gets updated every time an answer is submitted, with the question number, member id and response. I wish to produce a SELECT query that will find the questions that haven't been answered by a particular member, i.e. a query that finds the questions that DO NOT have an entry in responses. How can I do this? Regards, Robin -- /---------------------------------------------=[ BILLY S HALSEY ]=--\ | Member of Technical Staff, Sun Microsystems, Inc. ESP Solaris SW | | "All opinions and technical advice offered in this message are my | | own and not necessarily endorsed by my employer." | \--=[ bsh-php@sun.com ]=--------------------------------------------/