Hi,
I have a small table --
CREATE TABLE diecast (
stock_number varchar(20) binary NOT NULL,
item_description tinyblob NOT NULL,
sales_price decimal(7,2) DEFAULT '0.00' NOT NULL,
class char(1) DEFAULT 'n' NOT NULL,
PRIMARY KEY (stock_number));
I have created a form, using PHP, a portion of which is --
$query = "INSERT INTO diecast VALUES ('$stock_number', '$item_description',
'$sales_price', '$class')";
I have noticed, that should the user simply not enter anything, mysql takes
it anyway. Only once for stock_number, which is the primary key, indefinitely
on other fields. I thought NOT NULL would cause an error? I intend to install
a form validation routine to handle this, still, I'm curious.
Thanks,
Robert