>>>>> "Jason" == Jason Lewis <[EMAIL PROTECTED]> writes:

Jason> Hi,
Jason> I am trying to execute a query and having problems with the quotes.

Jason> this is what I want to do:

Jason> [%    FOREACH item = DBI.query('SELECT YCatalogue.CatalogueTitle FROM
Jason> YCatalogue' where CatalogueTitle = "January 2004"') %]

Jason> but TT doesn't seem to like my double quotes in the single
Jason> quotes. Should I escape them somehow? or am I doing something wrong?

Yes, use a placeholder.

[% query = DBI.prepare("SELECT YCatalogue.CatalogueTitle FROM YCatalogue where 
CatalogueTitle = ?");
  FOREACH item = query.execute("January 2004"); %] ... [% END %]

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!

_______________________________________________
templates mailing list
[EMAIL PROTECTED]
http://lists.template-toolkit.org/mailman/listinfo/templates

Reply via email to