You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl@perl.apache.org by Jon Brisbin <br...@ipa.net> on 2000/08/12 03:41:45 UTC
multiple selects
Will I have to use a database object to do mulitple selects within one
page?? I've got a navigation page that comes from one table and the content
that comes from another table...is it possible to do more than one
DBIx::Recordset->Search within a page?? I'm having trouble with it
now...the first one works, but the second one doesn't...
Jon Brisbin
Re: multiple selects
Posted by Gerald Richter <ri...@ecos.de>.
> Will I have to use a database object to do mulitple selects within one
> page?? I've got a navigation page that comes from one table and the
content
> that comes from another table...is it possible to do more than one
> DBIx::Recordset->Search within a page?? I'm having trouble with it
> now...the first one works, but the second one doesn't...
>
You have to setup a DBIx::Recordset table for each table you want to access.
To avoid the overhead of setting up a second database handle, either use a
DBIx::Datasebase object and with the param !KeepOpen =>1 and use this object
as argument to the !DataSource parameter of DBIx::Recordset or simply use
the first DBIx::Recordset object as argument for all following !DataSource
parameters. In this way you can have as much DBIx::Recordset object in one
page without any overhead.
Hope I got your question right?
Gerald
-------------------------------------------------------------
Gerald Richter ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting
Post: Tulpenstrasse 5 D-55276 Dienheim b. Mainz
E-Mail: richter@ecos.de Voice: +49 6133 925151
WWW: http://www.ecos.de Fax: +49 6133 925152
-------------------------------------------------------------
Re: multiple selects
Posted by Jon Brisbin <br...@ipa.net>.
I figured out a hack to this...I just duplicate my $fdat{'!DataSource'}, et.
al. in a separate file called content.ehtml, then from my main page, I do my
navigation, which is a "sub" imported from a Util file...then I "Execute"
the content page, passing my record id in the param array...it's kind of a
kludge, but it works :-)
is there a more elegant way than this to accomplish this??
Thanks!
Jon Brisbin
www.jbrisbin.net
mail@jbrisbin.net
----- Original Message -----
From: Jon Brisbin <br...@ipa.net>
To: Embeded PERL ML <em...@perl.apache.org>
Sent: Friday, August 11, 2000 8:41 PM
Subject: multiple selects
> Will I have to use a database object to do mulitple selects within one
> page?? I've got a navigation page that comes from one table and the
content
> that comes from another table...is it possible to do more than one
> DBIx::Recordset->Search within a page?? I'm having trouble with it
> now...the first one works, but the second one doesn't...
>
> Jon Brisbin
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
> For additional commands, e-mail: embperl-help@perl.apache.org
>