title: how to get last inserted row id in sqlite
body: <pre><code>function insertToProject(cast, pName)
  {
      db.execute('INSERT INTO project (cd, pn) VALUES (?,?)', cast, pName);
          var x = last_insert_rowid();
          return x;
  }
  </code></pre>
  
  <p>I have been trying this using javascript in titanium appcelerator. Can anybody tell me what I am doing wrong?</p>