List:General Discussion« Previous MessageNext Message »
From:Robert Pruitt Date:June 5 1999 6:03pm
Subject:Not Null
View as plain text  
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


Thread
Dates in MySQLChristopher R. Jones3 Jun
  • Re: Dates in MySQLSasha Pachev3 Jun
  • Re: Dates in MySQL(Paul D. Smith)3 Jun
  • Re: Dates in MySQLVan4 Jun
    • Re: Dates in MySQLBenjamin Pflugmann5 Jun
  • Re: Dates in MySQLJim Faucette5 Jun
  • Not NullRobert Pruitt5 Jun
    • Re: Not NullPaul DuBois5 Jun