#! /usr/bin/perl -wT use strict; #force all variables to be declared before use use DBI; # import database interface methods use CGI qw(:standard escape escapeHTML); use CGI::Carp qw(warningsToBrowser fatalsToBrowser); use lib qw(/home/gmacfadd/public_html/cgi-bin/WorkControl); use WorkControlDB; print header (), # use the text/html (default) Content-type headet start_html (); my $dbh = WorkControlDB::connect (); my @row3; #declare an array for listing of task items push (@row3, qq(
| ), qq(mySQL row #: $row->{id}), qq( | ), qq(Filename: $row->{filename}), qq( | ), qq(Mime-Type: $row->{mime_type}))); push (@row3, Tr ( qq( | ), qq(), a({-href=>$delete_url}, "Click here to delete this mySQL entry"), qq() ) ); push (@row3, Tr ( qq( | ), qq(), ######-after here insert logic here to download file in $row->{file} "insert link reserved for download here", ##### qq() ) ); push (@row3, Tr ( qq( | ), qq (end of this record) ) ); } #@ END DISPLAY_ITEM #@ START DELETE_ITEM sub delete_item { my ($dbh, $id) = @_; # @_ contains the parameters passed to that subroutine return ($dbh->do(qq{DELETE FROM testblob WHERE id = ?},undef,$id)); # return 0 if deletion of this record "id" was successful } #@ END DELETE_ITEM |