Ho un problemino .. :-)
NON mi funziona la commit
Codice PHP:
1)
$db->autocommit(false);
->> OK
2)
$query = "UPDATE ciccio
SET descrizione = 'TTTTTTTTT ..'
WHERE id_mandante = 1 ; ";
$query = $query . "UPDATE tab_1
SET testo = 'BBHH...'
WHERE id = 1 ; ";
if (mysqli_multi_query($db,$query))
{$esito 'OK' ;
$err = "Aggiornamento eseguito corretamente mysqli_multi_query !!";
}
else
{
$esito = 'KO' ;
$err = "Errore durante esecuzione aggiornamento SQL: " . mysqli_sqlstate($db) . " - " . mysqli_error($db);
}
->> OK
3)
if (!mysqli_commit($db))
{$esito = 'KO';
$err = "Errore durante esecuzione commit SQL: " . mysqli_sqlstate($db) . " - " . mysqli_error($db);
}
->> KO ->> Errore durante esecuzione commit SQL: HY000 - Commands out of sync; you can't run this command now