How to make the database giving me two datas

Question:

Hello my Database (Sqlite3) is giving me just one data from all the database, I want it to give me all datas but I don’t know why It didn’t, here’s what I tried

    c.execute("SELECT type FROM accounts")
    acctype = c.fetchmany()

It gave me just One for Some reasons !

Asked By: SIDALonpy

||

Answers:

By default, 1 is considered "many"! Use fetchmany(size=2) if you want to fetch the next 2 rows.

If you want all the rows, just use fetchall() instead.

Answered By: Thomas
Categories: questions Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.