[CDBI] question about set_sql and iterators

<arnim.rupp-5Wlsihp/[email protected]> Wed, 18 Nov 2009 15:07:09 +0100
Newsgroups gmane.comp.lang.perl.modules.class-dbi
Message-ID <BEC069CD86F9AC42A3ADB4AF737C92A31658F3@SW-FRAADS-MBX08.ads.dlh.de>
hello,

i have a problem with set_sql and iterators to get data from 2 tables. I us=
e the following (simplified) code:

---------------------------
use Class::DBI::Loader;

my $sql =3D"SELECT *
		FROM a,b
		WHERE a.id =3D b.id
		AND b.number > 5
		";

A->set_sql(seek_stuff =3D> $sql );
my $obj =3D A->search_seek_stuff();

while (my $record =3D $obj->next) {
	print $record->id; # works
	print $record->b.number; # doesn't work
}

---------------------------

i don't manage to get the results of the columns in table b and I find no h=
int in the documentation. any hints?



Mit freundlichen Gr=FC=DFen
Arnim Rupp



 =

Sitz der Gesellschaft / Corporate Headquarters: Lufthansa Systems Infratec =
GmbH, Kelsterbach, Registereintragung / Registration: Amtsgericht Darmstadt=
 83851
Vorsitzender des Aufsichtsrats / Chairman of the Supervisory Board: Dr. Gun=
ter Kuechler
Geschaeftsfuehrung / Management Board: Dr. Hannes Pfister