title: How to save a select query result in a variable?
body: <p>I'm working in a flask app and, like title suggests, I want to save a 'select query result' (sqlite db) in a variable like this:</p>
  
  <pre><code>id_ = g.db.execute("SELECT id_user FROM user WHERE name = ?", [username])
  </code></pre>
  
  <p>but it doesn't work fine. How can I do?</p>