<?php
$now = date("m/j/y h:i:s",time());
include "connect.php";
$now = date("j/m/y h:i:s",time());
$stmt = "Select * FROM subnets;";
echo "<BR>";
$sth = ibase_query($dbh, $stmt);
while ($row = ibase_fetch_object($sth)) {
$ip = explode(".", $row->IP_ADDRESS);
$subnet = $ip[0] . "." . $ip[1] . "." . $ip[2] . ".0";
$stmt2 = "update subnets set subnet = '$subnet' where serial = '$row->SERIAL'; ";
$sth2 = ibase_query ($dbh,$stmt2);
}
?>