add this:
$sth -> finish;
$dbh -> disconnect;
to the end
- Original Message -
From: "Simon Chan" <[EMAIL PROTECTED]>
To: "mysql Mail List" <[EMAIL PROTECTED]>
Sent: Thursday, May 17, 2001 11:44 PM
Subject: DBI:mysql error message
> Hey ever
Hey everybody,
This is my perl DBI script:
#!/usr/bin/perl -w
use DBI;
$username = "myusername" ;
$mypassword="mypassword" ;
my $dbh = DBI->connect("DBI:mysql:table1:localhost", "$username",
"$mypassword");
die "Can't open DB\n" if (!defined $dbh);
my $sth = $dbh->prepare("SELECT * FROM abc
To: "mysql Mail List" <[EMAIL PROTECTED]>
Sent: Wednesday, May 16, 2001 6:10 PM
Subject: DBI:mysql
> Does anyone know the correct syntax to connect to a mysql database with
DBI?
>
> I tried the syntax mentioned in the Perl DBI O'Reilly book, but I got
errors.
>
Does anyone know the correct syntax to connect to a mysql database with DBI?
I tried the syntax mentioned in the Perl DBI O'Reilly book, but I got errors.
thanks
=
#
Simon K. Chan
"Great spirits have always encountered violent opposition from medioc