[Templates] DBI question about placeholders

[prev] [thread] [next] [Date index for 2004/12/13]

From: Robert
Subject: [Templates] DBI question about placeholders
Date: 17:58 on 13 Dec 2004
Can I pass in a variable as the placeholder? I read in the DBI plugin docs 
that you can do something like this:

[% query = DBI.prepare('SELECT * FROM users WHERE uid = ?') %]

[% FOREACH user = query.execute('sam') %]
       ...
[% END %]

What I would like to do is pass a variable to the query.execute statement. 
If that is possible.

Robert
 




_______________________________________________
templates mailing list
templates@xxxxxxxxxxxxxxxx.xxx
http://lists.template-toolkit.org/mailman/listinfo/templates

[Templates] DBI question about placeholders
Robert 17:58 on 13 Dec 2004

Re: [Templates] DBI question about placeholders
Michael Peters 18:03 on 13 Dec 2004

Re: [Templates] DBI question about placeholders
Andy Wardley 08:54 on 14 Dec 2004

Generated at 08:55 on 15 Mar 2005 by mariachi v0.52