On Wednesday 16 April 2008 15:11, Don Baccus wrote: > On Apr 16, 2008, at 2:33 PM, Tom Jackson wrote: > > You should look at the pg driver, I think it can emulate bind > > variables, or > > maybe it is part of the db_* API of OpenACS. > > You have to compile nspostgres.c for OpenACS use to make the command > available. > > Then use ns_pg_bind rather than ns_db. :foo will reference the tcl > var foo in the caller.
So Xavier, your query would/could look something like this: set status 123 set sql { select * from table where status = :status } ns_pg_bind execute $db $sql (There are other options, check out the -bind switch, which takes an ns_set id.) tom jackson -- AOLserver - http://www.aolserver.com/ To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> with the body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: field of your email blank.