I knew it was an option somewhere... Perfect!
Thanks
JamesDR wrote:
> JamesDR wrote:
>> Scott Baker wrote:
>>> If I create the following table, and then try and insert the following
>>> data both inserts work. It looks like the second one works (it shouldn't
>>> because Last is NULL) because it a
JamesDR wrote:
> Scott Baker wrote:
>> If I create the following table, and then try and insert the following
>> data both inserts work. It looks like the second one works (it shouldn't
>> because Last is NULL) because it assumes Last = ''. Is there a way I can
>> make it NOT assume that? If Last i
Scott Baker escreveu:
If I create the following table, and then try and insert the following
data both inserts work. It looks like the second one works (it shouldn't
because Last is NULL) because it assumes Last = ''. Is there a way I can
make it NOT assume that? If Last is not specified it shoul
Scott Baker wrote:
> If I create the following table, and then try and insert the following
> data both inserts work. It looks like the second one works (it shouldn't
> because Last is NULL) because it assumes Last = ''. Is there a way I can
> make it NOT assume that? If Last is not specified it sh
Well also, 0x00 != 0
and to test for NULL in mysql you need to use special functions IS NULL,
IS NOT NULL etc.
Rodney Broom wrote:
>
> From: Andrew Hazen <[EMAIL PROTECTED]>
>
> > If it was blank, the sql statement would fail...
>
> Nope, you're passing an empty string with '$login'. NULL is
Hi Andrew,
If you insert NULL value into a column that is defined as NOT NULL , the
server puts in empty string ('') for the value... Try to use PHP to enforce
$login to have a string value.
Or you can compile a source distribution with -DDONT_USE_DEFAULT_FIELDS
option to overcome this. See : htt
From: Andrew Hazen <[EMAIL PROTECTED]>
> If it was blank, the sql statement would fail...
Nope, you're passing an empty string with '$login'. NULL is not empty, it's less that
that. It's nothing. What you want is:
emplogin=$login
Rather than:
emplogin='$login'
> ...is SOMETIMES blank
It is not inserting NULL. when $login is NULL or blank, then a a record,
with emplogin equal to a string of zero characters is inserted, which is
valid. A string with zero characters is NOT a NULL value. So, it is
accepted.
-Original Message-
From: Andrew Hazen [mailto:[EMAIL PROTECTED