MySQLdb where's fetchoneDict()?
gabriel_ambuehl at buz.ch
Mon Oct 1 10:33:44 CEST 2001
-----BEGIN PGP SIGNED MESSAGE-----
Sunday, September 30, 2001, 2:44:05 PM, you wrote:
>> AARGH. That means I can go and rewrite 2000 lines of code. (I
>> wouldn't mean not being portable...)
> I think it's classified as "deprecated" because it's nonstandard.
Ah then its ok. Some people use deprecated synonymous to "ain't here
any more cause it's bad" or "will go away in future cause it's bad".
> I don't think you have to replace all fetchoneDict() with
> fetchone() and ugly integer indices.
Using cursorclass=MySQLdb.cursors.DictCursor helps but now the
fetchone() / fetchall() methods return Dicts too which isn't really
what's wanted cause in case of a "SELECT one_field FROM some_table"
I'd normally use string=db.fetchone() which now breaks.
-----BEGIN PGP SIGNATURE-----
Version: PGP 6.5i
-----END PGP SIGNATURE-----
More information about the Python-list