[ic] Getting database handle in UserTag
Mike Heins
mike at perusion.com
Fri Jul 21 10:34:39 EDT 2006
Quoting Tim Nelson (timnelson at phreaker.net):
> Normally when I want to get a database handle in a page I do:
> [perl tables="userdb"]
> my $dbh = $Sql{userdb};
> ...
>
> How can I accomplish the same thing in a UserTag ?
In a global UserTag, it is:
my $db = dbref('products')
or die "no products table";
my $dbh = $db->dbh()
or die "not a DBI table";
In a catalog UserTag, there is no reliable way to do it
because of Safe restrictions.
--
Mike Heins
Perusion -- Expert Interchange Consulting http://www.perusion.com/
phone +1.765.647.1295 tollfree 800-949-1889 <mike at perusion.com>
The U.S. Senate -- white male millionaires working for YOU! -- Dave Barry
More information about the interchange-users
mailing list