PythonWin 2.4 (#60, Nov 30 2004, 09:34:21) [MSC v.1310 32
bit (Intel)] on win32.
Portions Copyright 1994-2004 Mark Hammond
(mhammond@skippinet.com.au) - see 'Help/About PythonWin'
for further copyright information.
What do you think the output should be here? Looks like it's
working to me. SHOW DATABASES shows what databases exist,
not which one you are using. Your example does not
demonstrate anything relevant.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It's "show databaseS" (what databases exist), not "show
database" (what database am I using). Try c.fetchall()
instead of c.fetchone() and you'll see why you are wrong.
Also, db.select_db(dbname) is not supposed to return
anything, because mysql_select_db(dbname) only returns an
error code.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Logged In: YES
user_id=71372
So... what does it do now? Post or attach a test case.
Logged In: NO
Please find the test case:
PythonWin 2.4 (#60, Nov 30 2004, 09:34:21) [MSC v.1310 32
bit (Intel)] on win32.
Portions Copyright 1994-2004 Mark Hammond
(mhammond@skippinet.com.au) - see 'Help/About PythonWin'
for further copyright information.
Logged In: YES
user_id=71372
What do you think the output should be here? Looks like it's
working to me. SHOW DATABASES shows what databases exist,
not which one you are using. Your example does not
demonstrate anything relevant.
Logged In: NO
Sorry the output shows that the select_db() do not work.
After the c.select_db('tango'), the show database show that
the database is still flamenco while it should be egal to tango.
In my humble opinion, the select_db method do not work
because the example show no return value.
Logged In: YES
user_id=71372
No.
It's "show databaseS" (what databases exist), not "show
database" (what database am I using). Try c.fetchall()
instead of c.fetchone() and you'll see why you are wrong.
Also, db.select_db(dbname) is not supposed to return
anything, because mysql_select_db(dbname) only returns an
error code.
Logged In: NO
Your are right. I tested again and it works correctly. Thanks
for your help.