Hey Everyone,
I have a strange problem.
I have been working with mysql and dbi most of the day, I am just new to
it all.
I am able to connect my database using the DBI module. When I run the
script on my command line it runs fine, and I get the data that I asked
for. But when I try to run this through a web browser, the cgi script
seems to stop in the middle and not print out any more text or data.
By placing simple text messages between the commands, I worked out that
the script stops outputting data after the 'prepare' statement.
EG.
Use DBI;
Print "dbi";
$dbh = DBI->connect('DBI:mysql:mydb');
print "connect";
$statement = "Select * from customers";
$sth = $dbh->prepare($statement);
print "prepare";
$sth ->execute;
$sth->finish();
$dbh->disconnect();
The print comments do not appear after 'connect'. Yet if I comment out
the prepare statement, they appear all the way through the script.
Any Ideas?
Emma