Hello everyone . I still cannot insert null values. The rest of the code
below works execpt for the null updates. Anu ideas would be appreciated.
Bryan
> if ($ip ne $oldip){
> $sth = $dbh->prepare("update ipmgt set
> ip = '$oldip',
> hw = 'NULL' ,
> dnsName = 'NULL' ,
> userName = 'NULL',
> os = 'NULL',
> dept = 'NULL',
> notes = 'NULL',
> bootType = 'NULL',
> bootFile = 'NULL',
> bootHost = 'NULL'
>
> where
> ip = '$oldip'");
>
> $sth = $dbh->prepare("update ipmgt set
> ip = '$ip',
> hw = '$hw',
> dnsName = '$dnsName',
> userName = '$userName',
> os = '$os',
> dept = '$dept',
> notes = '$notes',
> bootType = '$bootType',
> bootFile = '$bootFile',
> bootHost = '$bootHost'
>
> where
> ip = '$ip'");
>
> $rc= $sth->execute;
> $sth->finish;
>
> system ("/usr/bin/logger -t web-ip-update -p local3.info IP update
> for $oldip changed to $ip, hw- $hw");
> }
> else {
> $sth = $dbh->prepare("update ipmgt set
> ip = '$ip',
> hw = '$hw',
> dnsName = '$dnsName',
> userName = '$userName',
> os = '$os',
> dept = '$dept',
> notes = '$notes',
> bootType = '$bootType',
> bootFile = '$bootFile',
> bootHost = '$bootHost'
>
> where
> ip = '$ip'");
>
> $rc= $sth->execute;
> $sth->finish;
> $dbh->disconnect;