Re: My Darned Image Again

2009-12-08 Thread Carsten Haese
Victor Subervi wrote: > I don't know what happened, but when I > pulled that out, it threw a familiar error that alerted me to quote the > last variable (SKU="%s") and the blob went straight in. Thanks! The fact that you had to quote the SKU value indicates to me that it's an alphanumeric value (o

Re: My Darned Image Again

2009-12-08 Thread Victor Subervi
On Tue, Dec 8, 2009 at 3:28 PM, MRAB wrote: > Victor Subervi wrote: > >> Hi; >> I'm having trouble loading my image again. Here's my code: >> >> for pic in pics: >>sql = 'update %s set %s=%s where SKU=%s;' % (store, >> colNamesPics[i], '%s', sku) >> > > After this, 'sql' will be a st

Re: My Darned Image Again

2009-12-08 Thread Carsten Haese
Victor Subervi wrote: > Hi; > I'm having trouble loading my image again. Here's my code: > > for pic in pics: > sql = 'update %s set %s=%s where SKU=%s;' % (store, > colNamesPics[i], '%s', sku) > sql = sql, (MySQLdb.Binary(pics[int(i)]),) > cursor.execute(sql, (MySQLd

Re: My Darned Image Again

2009-12-08 Thread MRAB
Victor Subervi wrote: Hi; I'm having trouble loading my image again. Here's my code: for pic in pics: sql = 'update %s set %s=%s where SKU=%s;' % (store, colNamesPics[i], '%s', sku) After this, 'sql' will be a string. sql = sql, (MySQLdb.Binary(pics[int(i)]),) After

My Darned Image Again

2009-12-08 Thread Victor Subervi
Hi; I'm having trouble loading my image again. Here's my code: for pic in pics: sql = 'update %s set %s=%s where SKU=%s;' % (store, colNamesPics[i], '%s', sku) sql = sql, (MySQLdb.Binary(pics[int(i)]),) cursor.execute(sql, (MySQLdb.Binary(pics[int(i)]),)) prin