19 lines
703 B
PHP
Executable File
19 lines
703 B
PHP
Executable File
<?php
|
|
$nomFicAppelant = basename(__FILE__);
|
|
// -----------------------------------------------------
|
|
// Requete select max item
|
|
// -----------------------------------------------------
|
|
$res='';
|
|
$reqSelect="Select max(idZone) as mxId from zones ;";
|
|
$res=$idPdo->query($reqSelect);
|
|
if (isset($debug[2]) && $debug[2] == '1' ) { $debugMsg .= monDebug (2, ['reqSelect' => $reqSelect ],'gt.reqSelectMax.php');}
|
|
if ($res!='') {
|
|
$maxItem=$res->fetch(PDO::FETCH_ASSOC);
|
|
$nextIDItem=$maxItem['mxId'];
|
|
if ($nextIDItem=='') {$nextIDItem=0;}
|
|
if (isset($debug[2]) && $debug[2] == '1' ) { $debugMsg .= monDebug (2, ['max item' => $nextIDItem ],'');}
|
|
}
|
|
else {
|
|
$nextIDItem=0;
|
|
}
|
|
?>
|