title: MySQL autocommit vs. begin_transaction
body: <p>This is my (with little pseudo-) code:</p>
  
  <pre><code>$this-&gt;db = new mysqli ( $host, $user, $dbpw, $database );
  try {
       $this-&gt;db-&gt;mysqli-&gt;autocommit(FALSE);
       $sql = 'SOME SQL STATEMENT';
       $this-&gt;db-&gt;execute( $sql );
       $this-&gt;db-&gt;mysqli-&gt;commit();
  }
  catch (Exception $e)
  {
     echo($e);
     $this-&gt;db-&gt;mysqli-&gt;rollback();
  }
  </code></pre>
  
  <p>db-class has some enhancements i need but is capable of using the complete mysqli-class.</p>
  
  <p>i have 2 questions.</p>
  
  <p>a. why cant i start the transaction with</p>
  
  <pre><code>$this-&gt;db-&gt;mysqli-&gt;begin_transaction();
  </code></pre>
  
  <p>its throwing unknown method error. i really dont understand that.</p>
  
  <p>b. do i have to use</p>
  
  <pre><code>$this-&gt;db-&gt;mysqli-&gt;autocommit(TRUE);
  </code></pre>
  
  <p>?</p>