Re: MySql

2006-07-27 Thread miker2
Paul Boddie wrote: > John Machin wrote: > > Sibylle Koczian wrote: > > > John Machin schrieb: > > > > > > > > base.commit() > > [...] > > > > That's not really fair, because transactions were added to MySQL only a > > > short time ago (at least to the default table type). There simply hasn't >

Re: MySql

2006-07-27 Thread miker2
John Machin wrote: > [EMAIL PROTECTED] wrote: > > HI, > > > > I'm having trouble writing to a MySql db using python and the MySQLdb > > module. Here is the code: > > > > import MySQLdb > > base = MySQLdb.connect(host="localhost", user="blah", passwd="blah", > > db="test_py") > > cursor = base.curs

Re: MySql

2006-07-27 Thread miker2
Marc 'BlackJack' Rintsch wrote: > In <[EMAIL PROTECTED]>, miker2 wrote: > > > import MySQLdb > > base = MySQLdb.connect(host="localhost", user="blah", passwd="blah", > > db="test_py") > > cursor = base.curso

Re: write()

2006-07-27 Thread miker2
manuhack wrote: > How about write mode? Changing r to w doesn't work... > > [EMAIL PROTECTED] wrote: > > manuhack wrote: > > > I copied the lines > > > > > > f=open('/tmp/workfile', 'w') > > > print f > > > f.close() > > > > > > from Python 2.4 Documentation 7.2. But it said IOerror No such file

Re: write()

2006-07-26 Thread miker2
manuhack wrote: > I copied the lines > > f=open('/tmp/workfile', 'w') > print f > f.close() > > from Python 2.4 Documentation 7.2. But it said IOerror No such file or > directory" '/tmp/workfile' > > Is it something about the os? I'm using Python 2.4 under WinXP. > Thanks. Without / I can open

MySql

2006-07-26 Thread miker2
HI, I'm having trouble writing to a MySql db using python and the MySQLdb module. Here is the code: import MySQLdb base = MySQLdb.connect(host="localhost", user="blah", passwd="blah", db="test_py") cursor = base.cursor() cursor.execute("INSERT INTO table (field) VALUES (int)") this does not work