August 26th, 2005, 05:51 AM
argh... MySQLdb and tuples...
Hi to all:
With this function, is there anyway to NOT get a tuple as a result?
I get as a result: (500.0,)
if self.cursor not in self.error:
s = "SELECT SUM(ingreso) FROM LinIE"
Is there a way for getting directly a list? Because till now I have to transform the tuple to a list...
August 26th, 2005, 05:58 AM
I know in this case isnt needed, but I do have other functions where i get more data on the resulting tuples...
August 26th, 2005, 12:10 PM
If the tuple has multiple items, do this:
cursor_list = 
for item in self.cursor.fetchone():
August 26th, 2005, 06:30 PM
Ok, I'll finish some stuff and look at it. Thank u very much!