[CDBI] question about set_sql and iterators

arnim.rupp at lhsystems.com arnim.rupp at lhsystems.com
Wed Nov 18 14:07:09 GMT 2009


hello,

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

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

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

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

while (my $record = $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 hint in the documentation. any hints?



Mit freundlichen Grüßen
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. Gunter Kuechler
Geschaeftsfuehrung / Management Board: Dr. Hannes Pfister





More information about the ClassDBI mailing list