in reply to Re: (mysql) failing to locate object method
in thread (mysql) failing to locate object method
use DBI; # Here's how to include the DBI module my $dbh; my $db = 'myfirstdatabase'; my $db_user = 'RAM'; my $db_password = ''; # Connect to the requested server $dbh = DBI->connect ("dbi:mysql:$db","$db_user", "$db_password",{Raise +Error => 0, PrintError => 0} ) or err_trap("Cannot connect to the dat +abase"); my $sql; my $sth; $sql = "SELECT max(unxtmstmp) FROM logfl"; $sth=$dbh->prepare($sql) or die "preparing: ",$dbh->errstr; $sth->execute or die "executing: ", $dbh->errstr; @$d = $sth->fetchrow_array; print "@$d";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: (mysql) failing to locate object method
by beable (Friar) on Aug 03, 2004 at 10:05 UTC | |
by sriraj (Initiate) on Aug 03, 2004 at 10:53 UTC |