Пишу скрипт на Python:
def p(s):
s = string.replace(s,"\\'","_") # injection protect
s = string.replace(s,"'","\\'")
return s
cur.execute ('''INSERT INTO test
(id,name) VALUES
(%s,'%s')''' % (id,p(name))
Пишу скрипт на Python:
def p(s):
s = string.replace(s,"\\'","_") # injection protect
s = string.replace(s,"'","\\'")
return s
cur.execute ('''INSERT INTO test
(id,name) VALUES
(%s,'%s')''' % (id,p(name))