Re: Adding Images To MySQL

2008-04-07 Thread Gabriel Genellina
En Mon, 07 Apr 2008 15:17:26 -0300, Victor Subervi <[EMAIL PROTECTED]> escribió: >> sql = "insert into PRODUCTS (PRODID, NAME, DESCRIPTION) " \ >> "values (%s,%s,%s);" >> cursor.execute(sql, (prodid, prodname, description)) >> >> and it works fine. >> >> Note that execute has t

Re: Adding Images To MySQL

2008-04-07 Thread Victor Subervi
in line... On 4/5/08, Gabriel Genellina <[EMAIL PROTECTED]> wrote: > > En Sat, 05 Apr 2008 11:32:00 -0300, Victor Subervi > <[EMAIL PROTECTED]> escribió: > > >> * *- You say Content-Type: image/jpeg but you emit HTML code. You're > >> lucky > > if you see any > > > >> * *text at all. > > > > Well,

Re: Adding Images To MySQL

2008-04-05 Thread Gabriel Genellina
En Sat, 05 Apr 2008 11:32:00 -0300, Victor Subervi <[EMAIL PROTECTED]> escribió: >> * *- You say Content-Type: image/jpeg but you emit HTML code. You're >> lucky > if you see any > >> * *text at all. > > Well, I tried Content-Type: text/html and that threw an HTTP 500 Error. If your script ra

Re: Adding Images To MySQL

2008-04-05 Thread Victor Subervi
>* *(What a mess! I don't know where to begin...) Yeah. Never claimed to be any good at this :( Just persistent :) >* *- You say Content-Type: image/jpeg but you emit HTML code. You're lucky if you see any >* *text at all. Well, I tried Content-Type: text/html and that threw an HTTP 500 Error

Re: Adding Images to MySQL

2008-04-02 Thread Gabriel Genellina
En Wed, 02 Apr 2008 10:05:56 -0300, Victor Subervi <[EMAIL PROTECTED]> escribió: > I have tried the following code: > > #!/usr/local/bin/python > import _mysql > import MySQLdb > host = 'mysqldb2.ehost-services.com' > user = 'user' > passwd = 'pass' > db = 'bre' > print 'Content-Type: image/jpeg

Re: Adding Images to MySQL

2008-04-02 Thread Victor Subervi
I have tried the following code: #!/usr/local/bin/python import _mysql import MySQLdb host = 'mysqldb2.ehost-services.com' user = 'user' passwd = 'pass' db = 'bre' print 'Content-Type: image/jpeg\r\n' print '\nHi!\n' db=MySQLdb.connect(host=host, user=user, passwd=passwd, db=db) c=db.cursor() imgf

Re: Adding Images to MySQL

2008-04-01 Thread Gabriel Genellina
En Tue, 01 Apr 2008 09:36:00 -0300, Victor Subervi <[EMAIL PROTECTED]> escribió: > Hi; > I´m trying to figure out how to upload images into a MySQL database. > (Yes, > that is what I want to do.) I have a form that asks for data, like this: > 1ra Foto Pequeña: > > Then I send that form to a p

Adding Images to MySQL

2008-04-01 Thread Victor Subervi
Hi; I´m trying to figure out how to upload images into a MySQL database. (Yes, that is what I want to do.) I have a form that asks for data, like this: 1ra Foto Pequeña: Then I send that form to a python script that processes like this: cursor.execute('insert into products (' + col_names + ') valu