dbh_do($query); if ("$ntype"=="Korskopplingspanel") { $ifacetype="X-X"; } $query = "SELECT ID FROM networking WHERE (datemod = '$new_date')"; $sth = $adb->prepare($query); if($sth) { $res = $sth->execute(); $result = $sth->fetchrow_hash(); $ID = $result["ID"]; $i = 0; $in = 1; /* natural i */ while ($i < $numports) { $query = "INSERT INTO networking_ports VALUES (NULL, $ID, 2, '$ifacetype', '$ip', '$mac', $in, 'Port $in','','')"; $count = $adb->dbh_do($query); $i++; $in++; } logevent($ID, "networking", 4, "database", "$IRMName added record"); } else { PRINT "Could not prepare query: ".$sth->errstr."
\n"; } header("Location: http://$SERVER_NAME/$USERPREFIX/networking/info.php?ID=$ID"); ?>