Example #1
0
!-->
	<head>
		<meta charset="utf-8">
	</head>

	<body>

		<?php 
$root = substr($_SERVER['DOCUMENT_ROOT'], 0, -1);
require_once "{$root}/Class/Database.php";
$d = new Database("localhost", "gestore", "polipo", "gestione");
$Results = $d->GetRows("*", "tab_comuni", "", "", "", 1);
//~ echo "<pre> Results";
//~ print_r($Results);
//~ echo "</pre>";
foreach ($Results as $key => $field) {
    //~ echo "[Debug]: KEY: $key <br />";
    $Valori = $field;
    $Valori['Comune'] = ucfirst(strtolower($field['Comune']));
    $Valori['Prov'] = ucfirst(strtolower($field['Prov']));
    //~ echo "<pre>";
    //~ print_r($Valori);
    //~ echo "</pre>";
    $Status = $d->UpdateRow($Valori, "", "tab_comuni", "ID = '" . $Valori['ID'] . "'");
    echo "[Debug][" . $Valori['ID'] . "]: {$Status} <br />";
}
?>

	</body>
</html>