Trouble with Myqsl

Steve Holden sholden at holdenweb.com
Tue Apr 23 10:16:41 EDT 2002


"Jon Ribbens" <jon+usenet at unequivocal.co.uk> wrote in message
news:slrnacar0d.kd0.jon+usenet at snowy.squish.net...
> In article <uloacus4pml1r7f7eac9ts3u20oroj34qb at 4ax.com>, Fernando
Rodríguez wrote:
> >>curs.execute(
> >>    """insert into customer_info (email, url, referrer, first_visit)
> >>    values ( %s, %s, %s, %s)""",
> >>    ('billg at microsoft.com', 'www.easyjob.net', 'www.google.com',
'2001-03-07
> >>12:32:00')
> >>)
> >
> > mysqldb.error: (1064, "You have an error in your SQL syntax near
> > '@microsoft.com, www.easyjob.net, www.google.com, 2001-03-07 12:32:00)'
at
> > line 1")
>
> Woah, you have *seriously* screwed something up there. The code shown
> is correct. I suggest you post the earlier part of your code where
> your are connecting to the database and creating 'curs'.
>
> Are you sure you really are doing dbc.execute(foo, bar) and not
> dbc.execute(foo % bar)?

This error was caused by Fernando's following a bogus suggestion of mine.
His original SQL syntax was correct, and we are currently tracking down what
looks like an install problem.

regards
 Steve
--

home: http://www.holdenweb.com/
Python Web Programming:
http://pydish.holdenweb.com/pwp/








More information about the Python-list mailing list