That makes complete sense in two ways, first the way you suggested it,
second, if I were to ever try to insert a record that was actually NULL for
instance if I didn't have a newCat to enter for one record...your suggestion
would handle that too...

Thanks for that.

But my main problem remains.  I can't seem to get any data into my database.
Unless I do it one field at a time...which would be preposterous.  There has
got to be a way to do this!

----- Original Message -----
From: Tillema, Glenn <[EMAIL PROTECTED]>
To: 'SAWMaster' <[EMAIL PROTECTED]>
Sent: Thursday, June 07, 2001 3:32 PM
Subject: RE: INSERTing problems


> I think your script is expecting a value for the eigth item ... try
passing
> it NULL.
>
>
> my example below assumes the field is called 'ID'.
>
> ie
>
> $newNULL = 'NULL';
> $sqlstatement = "INSERT INTO Full (freq, loc, desc, freqtype, cat, call,
tx, ID) VALUES (?,?,?,?,?,?,?,?)";
> $sth = $dbh->prepare($sqlstatement) || die $dbh->errstr;
> $sth->execute($newfreq, $newloc, $newdesc, $newfreqtype, $newcat,
$newcall,$newtx, $newNULL) || die $dbh->errstr;
>
> Glenn Tillema                  [EMAIL PROTECTED]
> ADC Telecommunications, Inc.
> PO Box 1101, MS 508
> Minneapolis, MN  55440-1101
> Learn about ADC - The Broadband Company - www.adc.com
>

Reply via email to