Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

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

by Anonymous Monk
on Oct 17, 2003 at 16:11 UTC ( #300057=categorized answer: print w/replies, xml ) Need Help??

Q&A > database programming > What modules do I need to connect Perl to MySQL? - Answer contributed by Anonymous Monk

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
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (6)
As of 2016-09-27 16:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Extraterrestrials haven't visited the Earth yet because:







    Results (508 votes). Check out past polls.