in reply to Re^2: DBI and Hash
in thread DBI and Hash
Just for what it's worth, the default value for an inserted row is a NULL value. (Unless overridden, so I guess I should have said "default default value.") Assume a table named test of columns foo, bar, baz:
INSERT INTO test (foo, bar) VALUES('fred', 'barney');
Now, the column baz should be NULL. In other words, if you want to insert a NULL into a database, you can just omit it from the list of columns.
BTW, your foreach sets the numeric value zero and the empty string to NULL, too. I doubt you want that. You should be using unless exists $sqlinsert{$temp} instead.
Oh, and dummy values suck.
|
|---|