avo has asked for the wisdom of the Perl Monks concerning the following question:

I would like to extract a simple one line result using Template::Plugin::DBI in the documentation there is only examples of using FOREACH. I would like to do something like this:
[% user = DBI.query('SELECT name,password FROM users where id=? and va +lidated=1',profile.userid) %] USERNAME: [%user.name%]


How do I go about that? Thanks for your help.

Replies are listed 'Best First'.
Re: Template::Plugin::DBI question 2
by Anonymous Monk on Sep 04, 2008 at 12:24 UTC
    try it
      Already tried.
        Ah, try
        [% user = DBI.query('SELECT name,password FROM users where id=? and va +lidated=1',profile.userid).get() %] USERNAME: [%user.name%]