Gossamer Forum
Home : Products : Gossamer Links : Pre Sales :

Two Databases

Quote Reply
Two Databases
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

Subject Author Views Date
Thread Two Databases Robert 11245 Aug 25, 2000, 6:49 AM
Thread Re: Two Databases
pugdog 11090 Aug 25, 2000, 4:09 PM
Thread Re: Two Databases
Robert 11080 Aug 26, 2000, 4:18 AM
Thread Re: Two Databases
Robert 11069 Aug 26, 2000, 5:09 PM
Thread Re: Two Databases
pugdog 11055 Aug 26, 2000, 5:32 PM
Thread Re: Two Databases
Robert 11070 Aug 26, 2000, 5:43 PM
Thread Re: Two Databases
Robert 11033 Aug 27, 2000, 12:53 AM
Thread Re: Two Databases
Robert 11071 Aug 27, 2000, 1:21 AM
Thread Re: Two Databases
Alex 11016 Aug 28, 2000, 11:27 AM
Thread Re: Two Databases
Robert 10997 Aug 28, 2000, 9:56 PM
Thread Re: Two Databases
Alex 10980 Aug 29, 2000, 11:29 AM
Thread Re: Two Databases
Robert 10965 Aug 30, 2000, 4:44 AM
Thread Re: Two Databases
Alex 11004 Aug 30, 2000, 10:38 AM
Thread Re: Two Databases
Robert 10972 Aug 30, 2000, 2:32 PM
Thread Re: Two Databases
Stealth 10902 Sep 30, 2000, 10:52 AM
Thread Re: Two Databases
Stealth 10904 Sep 30, 2000, 11:42 AM
Thread Re: Two Databases
Stealth 10849 Oct 22, 2000, 8:51 PM
Thread Re: Two Databases
Robert 10815 Oct 27, 2000, 10:29 PM
Thread Re: Two Databases
Stealth 10808 Oct 28, 2000, 11:35 AM
Post Re: Two Databases
Robert 10814 Oct 28, 2000, 6:28 PM