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
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
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