simple(unformatted) select of dates returns NoneType
for MySQL-python-0.9.3b1 and python 2.3 on Mac OS X
10.3 This problem originally occured when I upgraded
to Mac OS X 10.3 and python 2.3. (default OS X 10.3
python install)
Mysql version 4.013-standard
I attempted to use the 0.9.3.b3 version but it gives:
gunzip: MySQL-python-0.9.3b3.tar.gz: invalid compressed
data--crc error
here is a sample of code testing the values returned
when selecting now().
db = MySQLdb.connect(db=sqldb, user=sqluser,
host=sqlhost)
mysqlc = db.cursor()get datetime
... qrystmt = 'select upper(now() + 0)'
mysqlc.execute(qrystmt)
1L
print mysqlc._rows
(('20040212153953',),)qrystmt = 'select now()'
mysqlc.execute(qrystmt)
1L
print mysqlc._rows
((None,),)
type(mysqlc._rows[0][0])
<type 'NoneType'="">
Logged In: YES
user_id=71372
don't play with _rows
Logged In: YES
user_id=974317
fetchall seems to have the same problem. Should I use
something else?
Logged In: YES
user_id=71372