Basics::Rollback
Drop the transactions created since last Basics::Begin Sintaxe namespace ProtocolLive\PhpLiveDb; function Basics::Rollback():void; See more - Begin - Commit - Types Example
try{
* The variable $Db are created in PhpLiveDb::__construct
$Db->Begin();
}catch(PDOException){$consult = $Db->Insert('users'); $consult->FieldAdd('email', 'a@a.com', Types::Str); $consult->FieldAdd('password', '123', Types::Str); $consult->Run(); $Db->Commit();
$Db->Rollback();
}
|