Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
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 all is quiet...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (3)
As of 2017-11-23 06:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (328 votes). Check out past polls.

    Notices?