$db->beginTransaction();
$stmt = $db->prepare("SELECT * FROM `post` WHERE `id` = :id");
$stmt->execute(['id' => $id]);
$post = $stmt->fetch(PDO::FETCH_ASSOC);
$db->commit();
$db->beginTransaction();
$stmt = $db->prepare("SELECT * FROM `post` WHERE `id` = :id");
$stmt->execute(['id' => $id]);
$post = $stmt->fetch(PDO::FETCH_ASSOC);
$db->commit();
Comments
Post a Comment