$res=$query->execute();
if($res){
$query->execute();
}
$db->beginTransaction();
$query->execute();
$query->execute();
$db->commit();
$db->beginTransaction();
if ($query->execute()) {
if ($query->execute()) {
$db->commit();
return true;
}
}
$db->rollback();
return false;