On Jul 31 10:40, Parthan SR wrote:
> On 7/31/06, Richard Huxton <dev@archonet.com> wrote:
> Traceback (most recent call last): File
> "/usr/lib/cgi-bin/ConfSachem/page2.py", line 75, in ? main(num_days) File
> "/usr/lib/cgi-bin/ConfSachem/page2.py", line 68, in main query =
> cursor.execute('INSERT INTO ConfMain (ConfName, ConfHost, ConfStart,
> ConfEnd, ConfDays, ConfStartTime, ConfEndTime, ConfSize) VALUES (?, ?, ?, ?,
> ?, ?, ?, ?)', (conf_name, host_name, start_day, end_day, num_days,
> start_time, end_time, aud_size)) psycopg.ProgrammingError: ERROR: syntax
> error at or near "," at character 120 INSERT INTO ConfMain (ConfName,
> ConfHost, ConfStart, ConfEnd, ConfDays, ConfStartTime, ConfEndTime,
> ConfSize) VALUES (?, ?, ?, ?, ?, ?, ?, ?)
Did you follow the 120 character? It points to ',' just after '?'. Can
you please replace '?' character with '%s'. I'm not sure but, IIRC,
psycopg variable using method (e.g. "$1, $2, ..." or "?, ?, ...")
should be adjustable.
Regards.