first of all,u can download DBD/DBI modules such as DBI-perl-bin-1.06.tar.gz and msql-mysql-moduels-XXX.tar.gz.
then compile it.
you can test the perl script below to test.
$dbh = DBI->connect($data_s,$username,$passwd) or die "shit,can't connect:$dbh->errstr\n";
print "Creating table jiangzk\n";
CREATE TABLE jiangzk(
id int(2) primary key,
hobby char(10))")) or die $DBI::errstr;
print "Insert records\n";
$dbh->do("insert into jiangzk values(1,'jzk','football')") or die $DBI::errstr;
$dbh->do("insert into jiangzk values(2,'gaoyin','love')") or die $DBI::errstr;
print "Testing records\n";
$sth=$dbh->prepare("select * from jiangzk") or die die $dbh->errstr;
$sth->execute() or die $sth->errstr;
while (($row = $sth->fetchrow_arrayref))
print $row->," ",length($row->),"\n";
die "Record had wrong data";
$dbh->do("drop table $table") or die $DBI::errstr;
print "Test ok\n";
----- Original Message -----
From: Larry Mak <MakAtak@stripped>
Sent: Thursday, May 27, 1999 11:34 AM
Can someone tell me how PERL interacts with SQL? Is it nearly the same as PHP?[I need PERL for file stuff]
Sorry, new on the list if this question was already answered.
Thanks in advance
Just because two people argue, it doesn't mean they don't
love each other, and just because they don't argue doesn't
mean they do.
- Larry Mak
|• PERL||Larry Mak||27 May|
| • Re: PERL||Sasha Pachev||27 May|
| • Re: PERL||jiangzk||27 May|