Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: What modules do I need to connect Perl to MySQL?

by Anonymous Monk
on Oct 17, 2003 at 16:11 UTC ( [id://300057]=note: print w/replies, xml ) Need Help??


in reply to What modules do I need to connect Perl to MySQL?

It's simple, select 'Mysql':
#!/usr/bin/perl use Mysql; $DBHOST = "localhost"; $DBNAME = "dbname"; $DBUSER = "user"; $DBPASS = "password"; $DB = Mysql->connect($DBHOST, $DBNAME, $DBUSER, $DBPASS); my $qry = $DB->query( qq~SELECT * FROM cds~ ); while( @emps = $qry->fetchrow) { print qq~ $emps[0]<br> ~; }

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://300057]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (3)
As of 2024-04-24 23:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found