Re: update images inside a mysql database

2005-02-25 Thread Jonas Meurer
On 25/02/2005 Dennis Lee Bieber wrote: > On Thu, 24 Feb 2005 23:10:48 +0100, Jonas Meurer <[EMAIL PROTECTED]> > declaimed the following in comp.lang.python: > > > > version used placeholders as well. anyway, i changed my code to resemble > > "resemble" is the key... It is NOT the correct s

Re: update images inside a mysql database

2005-02-24 Thread Jonas Meurer
On 24/02/2005 Gabriel Cooper wrote: > I've never tried extensively to use images inside a database (too slow > for most of my uses), but I thought I'd drop in to point out that you > should, for security reasons, be using place holders on your sql. It > might just fix your image problem as well,

Re: update images inside a mysql database

2005-02-24 Thread Gabriel Cooper
Jonas Meurer wrote: def i_update(image, imgid): image = "%s" % (image) sql_exec = """UPDATE Images SET Image='%s' WHERE ImgID = '%s' """ % (image, imgid) o = open("/tmp/file.jpg", "w") o.write(image) o.close() db_connect.cursor.execute(sql_e

update images inside a mysql database

2005-02-24 Thread Jonas Meurer
hello, i develop a project with a mysql interface. one mysql table holds all the images for my project. everything works quite well so far, except i'm not able to upload images into the database. the following function does the mysql UPDATE, it requires the image and the image ID as arguments. a