Instructor: EOF $statement1 = "Select emp_ID, fname, lname From employees Where is_prof=1"; $sth1 = $dbh->prepare($statement1); $sth1->execute; my %row; $sth1->bind_columns( \( @row{ @{$sth1->{NAME_lc} } } )); while($sth1->fetch){ print"$row{fname} $row{lname}"; } print <
Sales Person: EOF $statement2 = "Select emp_ID as emp_id2, fname as fname2, lname as lname2 From employees Where is_salerep=1"; $sth2 = $dbh->prepare($statement2); $sth2->execute; my %row; $sth2->bind_columns( \( @row{ @{$sth2->{NAME_lc} } } )); while($sth2->fetch){ print"$row{fname2} $row{lname2}"; } print <
Course: EOF $statement3 = "Select course_ID, cname From courses"; $sth3 = $dbh->prepare($statement3); $sth3->execute; my %row; $sth3->bind_columns( \( @row{ @{$sth3->{NAME_lc} } } )); while($sth3->fetch){ print"$row{cname}"; } print <
Buyer: EOF $statement4 = "Select com_ID, cname as comname From companies"; $sth4 = $dbh->prepare($statement4); $sth4->execute; my %row; $sth4->bind_columns( \( @row{ @{$sth4->{NAME_lc} } } )); while($sth4->fetch){ print"$row{comname}"; }[/B] print <
Date Sold (YYYY/MM/DD):
Price Sold For: