On Wed, 3 Sep 2003, Randal L. Schwartz wrote:
> >>>>> "Franco" == Franco Bagnoli <[EMAIL PROTECTED]> writes:
>
> This seems to work fine without a patch:
>
> [%
> USE d = DBI(database = "dbi:AnyData:null", user = "", password = "");
> d.dbh.func("users", "Passwd", "/etc/passwd", "ad_catalog");
> FOREACH user = d.query("SELECT username, homedir, GID FROM users");
> user.username; " has homedir of "; user.homedir;
> " and GID of "; user.GID; "\n";
> END;
> %]
yes, but I think that one should be able to write
[%
USE d = DBI(database = "dbi:AnyData:null", user = "", password = "");
d.func("users", "Passwd", "/etc/passwd", "ad_catalog");
FOREACH user = d.query("SELECT username, homedir, GID FROM users");
user.username; " has homedir of "; user.homedir;
" and GID of "; user.GID; "\n";
END;
%]
(I did not realize that one could estract the dbh from the object)
--
Franco Bagnoli (franchino) <[EMAIL PROTECTED]> ([EMAIL PROTECTED])
virtual location: Dipartimento di Energetica "S. Stecco"
real location: Dip. Matematica Applicata "G. Sansone", Universita' Firenze,
Via S. Marta, 3 I-50139 Firenze, Italy. Tel. +39 0554796422, fax: +39 055471787
GPG Key fingerprint = 169D 9EA5 8FD3 7EDA E43A 9830 255F BCEC 0D63 3728
_______________________________________________
templates mailing list
[EMAIL PROTECTED]
http://lists.template-toolkit.org/mailman/listinfo/templates