"; //end -- update wms table //update layer table $v = array(); $t = array(); $sql = "SELECT layer_id FROM layer WHERE uuid IS NULL;"; $res = db_prep_query($sql,$v,$t); $countLayerWithoutUuid = 0; while($row = db_fetch_array($res)){ $layerId = $row['layer_id']; $uuid = new Uuid(); $vUpdate = array($uuid,$layerId); $tUpdate = array('s'); $sqlUpdate = "UPDATE layer set uuid = $1 WHERE layer_id = $2;"; $resUpdate = db_prep_query($sqlUpdate,$vUpdate,$tUpdate); $countLayerWithoutUuid++; } echo $countLayerWithoutUuid." Layer updated!"; echo "
"; //end -- update layer table //update wfs table $v = array(); $t = array(); $sql = "SELECT wfs_id FROM wfs WHERE uuid IS NULL;"; $res = db_prep_query($sql,$v,$t); $countWfsWithoutUuid = 0; while($row = db_fetch_array($res)){ $wfsId = $row['wfs_id']; $uuid = new Uuid(); $vUpdate = array($uuid,$wfsId); $tUpdate = array('s'); $sqlUpdate = "UPDATE wfs set uuid = $1 WHERE wfs_id = $2;"; $resUpdate = db_prep_query($sqlUpdate,$vUpdate,$tUpdate); $countWfsWithoutUuid++; } echo $countWfsWithoutUuid." Wfs updated!"; echo "
"; //end -- update wfs table //update featuretype table $v = array(); $t = array(); $sql = "SELECT featuretype_id FROM wfs_featuretype WHERE uuid IS NULL;"; $res = db_prep_query($sql,$v,$t); $countFeaturetypeWithoutUuid = 0; while($row = db_fetch_array($res)){ $featuretypeId = $row['featuretype_id']; $uuid = new Uuid(); $vUpdate = array($uuid,$featuretypeId); $tUpdate = array('s'); $sqlUpdate = "UPDATE wfs_featuretype set uuid = $1 WHERE featuretype_id = $2;"; $resUpdate = db_prep_query($sqlUpdate,$vUpdate,$tUpdate); $countFeaturetypeWithoutUuid++; } echo $countFeaturetypeWithoutUuid." Featuretype updated!"; echo "
"; //end -- update featuretype table ?>