$sth=$dbh->prepare("select b.req_id,ccode from rtsdet
a,rtshead b where b.req_id
=a.req_id and date_stamp BETWEEN '2002/01/01'
AND '2002/02/28'");
$sth->execute
();
# will dump out all fields $data=$sth->dump_results();
#$data=$sth->dump_results();
#@data=$sth->fetchrow_array();
while (@data = $sth->fetchrow_array() ) {
print "Row: @data \n";
($req,$ccode)=split(/ /,@data);
####
print " $req $ccode \n";
}
$sth->finish;
Here is the output:
Row: 1784996 CAABBA
2
Row: 1785155 PHAD
2
Row: 1785153 PHAD
2
Row: 1785173 SEABBA
2
Row: 1785175 SEABBA
2
Row: 1785176 SEABBA
2
Row: 1785176 SEABBA
####
He who laughs last, doesn't get the joke.