title: SQLAlchemy get every row the matches query and loop through them
body: <p>I'm new to Python and SQLAlchemy. I've been playing about with retrieving things from the database, and it's worked every time, but im a little unsure what to do when the select statement  will return multiple rows. I tried using some older code that worked before I started SQLAlchemy, but <code>db</code> is a SQLAlchemy object and doesn't have the <code>execute()</code> method.</p>
  
  <pre><code>application = Applications.query.filter_by(brochureID=brochure.id)
  cur = db.execute(application)
  entries = cur.fetchall()
  </code></pre>
  
  <p>and then in my HTML file</p>
  
  <pre><code>      {% for entry in entries %}
        var getEmail = {{entry.2|tojson|safe}}
        emailArray.push(getEmail);
  </code></pre>
  
  <p>I looked in the SQLAlchemy documentation and I couldn't find a <code>.first()</code> equivalent to getting all the rows. Can anyone point me in the right direction? No doubt it's something very small.</p>