471,325 Members | 1,434 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,325 software developers and data experts.

MySQLdb.string_literal

I want to escape binary data so i can insert data into a blob

Using MySQLdb.string_literal(data) doesn't seem to escape everything ?

Nov 2 '07 #1
2 3987
On Fri, 2007-11-02 at 12:24 +0000, gert wrote:
I want to escape binary data so i can insert data into a blob
No, you don't want to escape binary data. You want to bind it to a
parametrized query:

http://informixdb.blogspot.com/2007/...in-blanks.html

Keep in mind, though, that MySQLdb uses %s as parameter markers instead
of the SQL standard question mark.

--
Carsten Haese
http://informixdb.sourceforge.net
Nov 2 '07 #2
On Nov 2, 1:48 pm, Carsten Haese <cars...@uniqsys.comwrote:
On Fri, 2007-11-02 at 12:24 +0000, gert wrote:
I want to escape binary data so i can insert data into a blob

No, you don't want to escape binary data. You want to bind it to a
parametrized query:

http://informixdb.blogspot.com/2007/...in-blanks.html

Keep in mind, though, that MySQLdb uses %s as parameter markers instead
of the SQL standard question mark.

ok thx, this is one of those questions i wished i asked way sooner.

Nov 2 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Dave Harrison | last post: by
1 post views Thread by Peter Nikolaidis | last post: by
1 post views Thread by Derek Fountain | last post: by
1 post views Thread by Michael | last post: by
2 posts views Thread by ws Wang | last post: by
1 post views Thread by Steve | last post: by
1 post views Thread by Yi Xing | last post: by
reply views Thread by Steve Holden | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.