Mailing List Archive

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 [ In reply to ]
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 <brisbin@ipa.net>
To: Embeded PERL ML <embperl@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
>
Re: multiple selects [ In reply to ]
> 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
-------------------------------------------------------------