I have written the following code in Perl. I have ActivePerl 5.14 for Windows 7.
#!C:\perl64\bin\perl.exe -wT
use strict;
use warnings;
use DBI;
print "Content-type: text/html \n\n";
# MYSQL CONFIG VARIABLES
my $driver = "mysql";
my $database = "test555";
my $tablename3 = "test77";
my $user = "root";
my $pw = "root";
# PERL MYSQL CONNECT()
my $dbh = DBI->connect("DBI:$driver:$database", $user, $pw,);
my $sth = $dbh->prepare("
SELECT *
FROM t6
WHERE paragraph='PWE1234'
");
$sth->execute();
#$dbh->disconnect;
#exit 0;
When the program reaches $dbh->disconnect
, the system is throwing an error; hence commented it out. When I comment that out, the system is not throwing any error, but neither do I get output.
There is a result for this query, I checked with MySQL once separately.