Say we have two databases outside; one is links another is only one table but i do everything the same for it as links has for itself; so i have a .def for my table and so on.
Now i want to pass to the home.htm a tag with data from this second db.
So here we go:
1. Add the vars in build_home(Build.cgi), the same as doing it for links itself,
2. give the links.pm some more vars; one for the
path to admin of the second db ...
Add this to build.cgi
# Verbraucher/Themen DB
$LINKDB_V_T = new Links::DBSQL "$LINKS{admin_themen_root_path}/defs/Links.def";
Add this to home_build in build.cgi
##--## Last New X von Verbraucher/Themen DB on home
# Let's get all the new links and order them nach build_sort_order_new_home in links.pm
$sth = $LINKDB_V_T->prepare (qq!SELECT * FROM Links order by $LINKS{build_sort_order_themen_home} LIMIT 5!);
$sth->execute();
($sth->rows > 5) and print "\tWarning: Max New links limit of 5 exceeded!\n";
Now i thought, the sub would get the links.def from my new DB, from there it gots the data for the db, then calling dbsl, connect to db and get the right data, passing to a tag later; but what should i say, this &(§/%(/§%&" Thing gets dfata from my links; so is it possible that dbsl has a static value somewhere which db is connected, and only the table is passed tru ???
Hmm, very mysterious.
Robert
Now i want to pass to the home.htm a tag with data from this second db.
So here we go:
1. Add the vars in build_home(Build.cgi), the same as doing it for links itself,
2. give the links.pm some more vars; one for the
path to admin of the second db ...
Add this to build.cgi
# Verbraucher/Themen DB
$LINKDB_V_T = new Links::DBSQL "$LINKS{admin_themen_root_path}/defs/Links.def";
Add this to home_build in build.cgi
##--## Last New X von Verbraucher/Themen DB on home
# Let's get all the new links and order them nach build_sort_order_new_home in links.pm
$sth = $LINKDB_V_T->prepare (qq!SELECT * FROM Links order by $LINKS{build_sort_order_themen_home} LIMIT 5!);
$sth->execute();
($sth->rows > 5) and print "\tWarning: Max New links limit of 5 exceeded!\n";
Now i thought, the sub would get the links.def from my new DB, from there it gots the data for the db, then calling dbsl, connect to db and get the right data, passing to a tag later; but what should i say, this &(§/%(/§%&" Thing gets dfata from my links; so is it possible that dbsl has a static value somewhere which db is connected, and only the table is passed tru ???
Hmm, very mysterious.
Robert