23 lines
726 B
PHP
23 lines
726 B
PHP
#!/usr/bin/php
|
|
<?php
|
|
|
|
//require 'vendor/autoload.php';
|
|
require("../../../config/config.php");
|
|
|
|
define('FRONKDB_SQLDEBUG',false);
|
|
error_reporting(E_ALL & ~(E_NOTICE | E_STRICT | E_DEPRECATED));
|
|
|
|
require_once(LIBDIR."/mvcfronk/mfRouter/mfRouter.php");
|
|
require_once(LIBDIR."/mvcfronk/mfBase/mfBaseModel.php");
|
|
require_once(LIBDIR."/mvcfronk/mfBase/mfBaseController.php");
|
|
|
|
|
|
foreach(ADBWohneinheitModel::search(["netzgebiet_id" => 31]) as $unit) {
|
|
$hausnummer = $unit->hausnummer;
|
|
if(strpos($unit->oaid, $hausnummer->oaid) === false) {
|
|
echo "wrong oaid ".$unit->oaid." - should start with ".$hausnummer->oaid;
|
|
echo " => Correcting to ".$unit->getNewOAID()."\n";
|
|
$unit->oaid = $unit->getNewOAID();
|
|
$unit->save();
|
|
}
|
|
} |