title: Inserting row into SQLite table
body: <p>I'm trying to add a row (post submitted by user) into a SQLite table (posts).
  I need to add the new post with the timestamp being the current time and date and then i need to return the id for this new post.</p>
  
  <p>My code so far (incomplete as im not sure how to return the id and if im inserting the right info):</p>
  
  <pre><code>def post_add(conn, username, message):
  
      cursor = conn.cursor()
      cursor.execute("INSERT INTO posts (timestamp, username, message) VALUES (CURRENT_TIMESTAMP,?,?)"
                     , (username, message))
      db.commit()
  </code></pre>
  
  <p>The table:</p>
  
  <pre><code>CREATE TABLE posts (
              id integer unique primary key autoincrement,
              timestamp text default CURRENT_TIMESTAMP,
              username text,
              message text,
              FOREIGN KEY(username) REFERENCES users(name)
  );
  </code></pre>