title: iOS SQLite FMDB Transactions.. Correct usage?
body: <p>I'm just going to try out using transactions with the FMDB SQLite iOS wrapper.</p>
  
  <p>The documentation is a little vague on transactions but from having a quick look at some functions I have come up with the following logic:</p>
  
  <pre><code>[fmdb beginTransaction];
      // Run the following query
      BOOL res1 = [fmdb executeUpdate:@"query1"];
      BOOL res2 = [fmdb executeUpdate:@"query2"];
  
  if(!res1 || !res2) [fmdb rollback];
  else [fmdb commit];
  </code></pre>