DBI Info

Pablo@zunigatech.com Pablo@zunigatech.com
Tue, 23 May 2000 12:20:40 -0700


Don:
I found a website which answers your question along with many others. 
http://www.stars.com/Authoring/DB/Intro/dbi_intro.html

I use DBI to connect to MySQL extensively. Here's an example of one of my
connections. I'm on Linux RH 6.1 and the DB is on the same machine. Does your
code look something like this?

$dbh = DBI->connect('dbi:mysql:my_db:localhost', 
'username', 'password', {RaiseError => 1}); 
$sth = $dbh->prepare("select first_name, last_name from user_tbl"); 	
$sth->execute;
$search_results = $sth->fetchall_arrayref;
$sth->finish;
$dbh->disconnect;

Hope that helps.

-Pablo

Message: 1
From: "Don Harrop" <don@nis4u.com>
To: <plug-discuss@lists.PLUG.phoenix.az.us>
Subject: DBD::mysql
Date: Tue, 23 May 2000 10:52:10 -0700
charset="iso-8859-1"
Reply-To: plug-discuss@lists.PLUG.phoenix.az.us

Well, I finally got the install of DBD::mysql from CPAN to work.  Now I'm
getting a different error.

CGI Error:
Message: fatal error: [Tue May 23 10:40:53 2000] replicator2000.cgi: Error:
could not get DBI handle


I'm clueless.  What's a DBI handle?

Don


Down, but not out!

(.)(.)
\
\/\/\/


--__--__--