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
>
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
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
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
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
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