print < EOF #retrieve business plans $ci_blah = "mypassword"; use DBI; $dbh_m = DBI->connect('DBI:mysql:companies','myusername',$ci_blah) or die "Couldn't connect to database: " . DBI->errstr; $sql_m = "SELECT id,firstname,lastname,country,file_name,summary,date FROM companies_db"; $sth_m = $dbh_m->prepare($sql_m) or die "preparing: ",$dbh_m->errstr; $sth_m->execute or die "executing: ", $dbh_m->errstr; $results = $sth_m->fetchrow_hashref; print " "; print " "; print " "; print " "; print " "; print " "; print " "; print " "; print " "; while (@data = $sth_m->fetchrow_array()) # keep fetching until # there's nothing left { print " "; print " "; print " "; print " "; print " "; print " "; print " "; print " "; print " "; } $sth_m->finish; $dbh_m->disconnect; print "
ID Name Company Country File Summary Date Submitted
$results->{'id'}$results->{'firstname'} $results{'lastname'}$results->{'company'}$results->{'country'}$results->{'file_name'}$results->{'summary'}$results->{'date'}
$data[0]$data[1] $data[2]$data[3]$data[4]$data[5]$data[6]$data[7]
";