title: using limits to query sqlite table in python
body: <p>I am trying to return multiple rows using a basic sqlite table using python. I modified the code slightly from the tutorials:</p>
  
  <pre><code> import sqlite3
   conn = sqlite3.connect('SQL_test_3.db') #this creates a seperate file
   c = conn.cursor()
  
  c.execute('drop table if exists stocks')
  c.execute('''create table stocks
  (date text, trans text, symbol text,
   qty real, price real)''')
  
  data = [('2006-03-28', 'BUY', 'IBM', 1000, 45.00),
        ('2006-04-05', 'BUY', 'MSFT', 1000, 72.00),
        ('2006-04-06', 'SELL', 'IBM', 500, 53.00),
        ('0000-00-00', 'Test', 'Test', 100, 100)
       ]
  
   for t in data:
       c.execute('insert into stocks values (?,?,?,?,?)', t)
  
  conn.commit()
  
  price = 72
  t = (price,)
  
  c.execute('select * from stocks where price=? limit 2', t)
  print c.fetchall()
  </code></pre>
  
  <p>I would like it to return:</p>
  
  <pre><code>[(u'2006-04-05', u'BUY', u'MSFT', 1000.0, 72.0)]
  [(u'2006-04-06', u'SELL', u'IBM', 500.0, 53.0)]
  </code></pre>
  
  <p>I thought about using the command:</p>
  
  <pre><code>c.execute('select * from stocks where price=? limit 2', t)
  </code></pre>
  
  <p>But it only returns the first row. I tried using offsets but that doesn't seem to work. Does anyone know how to solve this? If anyone could help that would be much appreciated. Thanks.    </p>