Db::commit

Usage

void Db::commit()

Description

Commit a database transaction.

Examples

Commit Transaction


// Begin transaction $this->db->beginTransaction(); // Insert a couple rows $this->db->insert('some_table', [ 'name' => 'John Doe', 'amount' => 86.11 ]); $this->db->insert('another_table', [ 'userid' => $this->db->insertId(), 'group_id' => 4 ]); // Commit transaction $this->db->commit();

See Also