NULL value question
- From: Jim James <jim@xxxxxxxxxxxxx>
- Date: Tue, 31 Jul 2007 15:04:49 -0400
I'm coding my first web site using a mysql
database and DBI.
I can fetch records from the database
with no problem, but I'm having trouble
testing NULL values. If I load the value
of a date field into a variable ($dateadded),
how should the IF condition be written?
if ( $dateadded = NULL ) {
print "Date added is NULL";
}
I found some information that talked
about NULLs being undef, but I'm
not sure how to use that information.
.
- Follow-Ups:
- Re: NULL value question
- From: Jim James
- Re: NULL value question
- From: Klaus
- Re: NULL value question
- From: Lawrence Statton
- Re: NULL value question
- From: Paul Lalli
- Re: NULL value question
- Prev by Date: Re: CGI displays contents of script
- Next by Date: Re: NULL value question
- Previous by thread: CGI displays contents of script
- Next by thread: Re: NULL value question
- Index(es):
Relevant Pages
|