Re: [DB-SIG] bound parameters

2007-01-08 Thread Carl Karsten
Carsten Haese wrote: > On Tue, 2007-01-02 at 15:32 -0600, Carl Karsten wrote: >> print "#3", cur.execute("select count(*) as ncount from %(table)s", {'table':'logs'} ) ! > > Using bound parameters for object names virtually guarantees that your > code is not portable to other databases. Not

Re: [DB-SIG] bound parameters

2007-01-02 Thread Carsten Haese
On Tue, 2007-01-02 at 15:32 -0600, Carl Karsten wrote: > print "#3", cur.execute("select count(*) as ncount from %(table)s", > {'table':'logs'} ) ! Using bound parameters for object names virtually guarantees that your code is not portable to other databases. The SQL standard allows placeholders

[DB-SIG] bound parameters

2007-01-02 Thread Carl Karsten
I just read the thread in http://www.mail-archive.com/db-sig@python.org/msg00478.html and am wondering what is currently 'best' for an application developer if we want our code to be portable across the various db modules? Here is what I am currently doing: import MySQLdb con = MySQLdb.connect