hi-

i think i found a bug in the DBI Plugin:

my template looks like this:

[% META title = "People" %]
[% USE DBI(db.dsn,db.name,db.pass) %]
[% sort = DBI.quote('fname') %]
[% statement = DBI.prepare('SELECT people.idn, people.fname, people.lname, bios.text 
FROM people LEFT JOIN bios USING (idn) ORDER BY ?') %]
[% "<h2>"; sort; "</h2>" %]
[% FOREACH person = statement.execute(sort) %]
   [%# WRAPPER section %]
        <a name="[% person.idn %]" />
          <h2>[% person.fname %] [% person.lname %]</h2></a>
        [% person.text | html_para %]
   [%# END %]
[% END %]

the statement is executed and produces output, but the rows are not
ordered as expected.  when i replace the '?' in the SQL statement with
a literal value, it returns the expected order.  it works in perl as
expected so the bug is TT.  looking through the code, the execute
method is passed to directly to the DBI object.

Template::Plugin::DBI version is 1.04

is there something i missed? any idea what this might be?

    hugh.


Reply via email to