• Hello there,

    Please have a look at below code

    $db = new PDO($dsn, $user, $password);
    $db->beginTransaction();
    try {
      // do your queries here, using PDO and $db object
      $db->commit();
    } catch (PDOException $e) {
      $db->rollback();
    }

    I need to know ,is there any class or function like above to manage transactions for multiple query or something similar ?

    Really appreciate if you can help me.
    Majid

  • The topic ‘WP Transaction with multiple query’ is closed to new replies.