PySide / SQLite3 - need duplicate code to parse query.first() then while query.next() ???
-
I assume this is a very basic database question but I'm still fairly new to database queries...
When executing a QSqlQuery, is it necessary to process the first row separately from subsequent rows? This is the way that I've been doing it:
@
query = QSqlQuery("SELECT Blahblah, Blippity, Bloop FROM Floozle ORDER BY Bloop")query.first()
codeToParseRecord() #If I leave this out it skips the first recordwhile query.next():
codeToParseRecord()
@Is this the best way to do it or am I missing something? It just seems wrong to have to duplicate code every time I execute a query.
Thanks
-