On 4/17/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> On Mon, 17 Apr 2006, Andy Todd wrote:
>
> >> stmt = "INSERT INTO table_x (body) VALUES (%s)" # [1]
> >> cursor.execute(stmt, (body,))
> >>> [1] note that there are no quote marks around the %s
> >>
> >> this works here (debian testi
On 4/17/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> On Mon, 17 Apr 2006, Andy Todd wrote:
>
> >> stmt = "INSERT INTO table_x (body) VALUES (%s)" # [1]
> >> cursor.execute(stmt, (body,))
> >>> [1] note that there are no quote marks around the %s
> >>
> >> this works here (debian testi
On 4/18/06, Lukasz Szybalski <[EMAIL PROTECTED]> wrote:
> On 4/17/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > On Mon, 17 Apr 2006, Andy Todd wrote:
> >
> > >> stmt = "INSERT INTO table_x (body) VALUES (%s)" # [1]
> > >> cursor.execute(stmt, (body,))
> > >>> [1] note that there are
On Tue, 18 Apr 2006, Lukasz Szybalski wrote:
SNIP
> Ok guys, thanks for help. I finally search for how to scape strings and i
> used:
>
> "insert into table(id,body) values ('%d',"'''"%s"'''")"%(id,body)
>
> where "'''" on each side of s = double quote + 3x single quote+ double quote
as andy d
On Tue, 2006-04-18 at 13:00 -0500, Lukasz Szybalski wrote:
> > When i try :
> > c.execute("Insert into table_x(body) VALUES(%s)",(body))
> > This will work but how do i make :
> >
> > sql="Insert into table_x(body) VALUES(%s)",(body)
> > c.execute(sql) #complains that i give it a tuple, which i di