#!/usr/bin/perl print "Content-type: text/html\n\n"; BEGIN { use lib '/usr/home/cfg' ; require push_inc ; } require cfg ; &today ; #------------------------------------------------------------------------------------------ use DBI; use CGI::Carp qw(fatalsToBrowser); &get_db_manifests ; print $results ; exit ; #------------------------------------------------------------------------------------------ sub get_db_manifests { &db_open_ro ; my $sql = qq(SELECT * FROM ffwaypls_filmfreight.manifests ORDER BY waybillno DESC) ; my $sth = $dbh->prepare($sql) ; $sth -> execute() or die "Could not execute SQL statement $sql ... maybe invalid? $!"; $manifest_array_ref = $sth->fetchall_arrayref(); $sth->finish(); &db_close_conn ; foreach $row (@$manifest_array_ref) { &db_manifest_fields ; if (($done{$mn_waybillno}) and ($done{$mn_waybillno} ne $mn_manifestdetailid)) { print "
$mn_waybillno -> $done{$mn_waybillno} -> $mn_manifestdetailid" ; } $done{$mn_waybillno} = $mn_manifestdetailid ; } } #------------------------------------------------------------------------------------------ use db ; use today ; 1;