fruitbeeriswrong has asked for the wisdom of the Perl Monks concerning the following question:
Does anyone have any ideas?#!/usr/bin/perl use DBI; use DBD::mysql; print q(Content-Type: text/html; charset=ISO-8859-1 ); print "DBI Version=" . $DBI::VERSION; print "<BR>DBD Version=" . $DBD::mysql::VERSION; $dbh = DBI->connect("DBI:mysql:<DATABASE NAME>:localhost","<USERNAME>" +,"<PASSWORD>") or print "<BR>Couldn't connect to database: " . DBI->errstr; $query=q{select user()}; $sth = $dbh->prepare($query); $sth->execute(); my $user_info; $sth->bind_columns(\$user_info); $sth->fetch(); print "<BR> User connected to MySql: $user_info";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: MySQL DBI Woe
by monarch (Priest) on Jan 24, 2006 at 04:45 UTC | |
by Anonymous Monk on Jan 24, 2006 at 15:20 UTC | |
|
Re: MySQL DBI Woe
by badaiaqrandista (Pilgrim) on Jan 24, 2006 at 04:21 UTC | |
|
Re: MySQL DBI Woe
by jZed (Prior) on Jan 23, 2006 at 19:21 UTC |