Here's what I use it should tell you exactly what your problem is:
Also check out tutorial on http://www.porlmonks.org.

-- David Jackson




use DBI;
use diagnostics;
use strict;
my ($dbh,$sth);
my ($dbname)="dataase_name";
my ($login)="login_name";
my ($password) ="your_pasword";
my (@ary);
#
$dbh = DBI->connect("DBI:mysql:$dbname",$login,$password)
        or die "Can't connect to $dbh: $dbh->errstr\n";
$sth = $dbh->prepare("SELECT * FROM catalog")
        or die "Can't connect to $dbh: $sth->errstr\n";
$sth-> execute()
        or die "Can't connect to $dbh: $sth->errstr\n";
$sth -> finish();
$dbh->disconnect();




---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to