MySQL and Perl
justsimple
created: 2004-07-01 03:34:19

Hello,
How with perl I can access MySql database? ( make queries and so on)?
Do I need some modules??? If "yes", then could you tell which modules are the most popular, best....

Edited by BazB: added formatting and fixed title: s/PERl/Perl/.

Re: MySQL and Perl
created: 2004-07-01 03:39:49

You need the following:

  • DBI - The DataBase Interface module.
  • DBD::mysql - The Database Driver for MySQL.
  • Class::DBI (optional) - Database abstraction.

And while we're at it, I'll recommend "Programming the Perl DBI" (An O'Reilly & Assoc. book). I found it quite helpful. If you need to learn SQL too, there are a million books out there on that subject.

All three of those modules are available on CPAN, as well as via PPM for Windows users.


Dave

Re: MySQL and Perl
created: 2004-07-01 05:06:09

For any database access perl can use the DBI module which provides a uniform access towards the database (any type of database).
You have to combine the DBI with the rightfull DBD.

Sounds hard, but you can find all on http://dev.mysql.com/downloads/dbi.html
Explanations on how to use it ...http://www.danchan.com/feature/2000/10/16/mysql/mysql.htm

Suc6,

Frans.

Edited by BazB: linkified links and added formatting

Book recommendation
created: 2004-07-01 11:43:27
MySQL and Perl for the Web, by Paul DuBois (New Riders). I wish there were more books like it to recommend!

perlmonks.org content © perlmonks.org and davebaker, davido, falflag, justsimple

prlmnks.org © 2006 edmund von der burg (eccles & toad)

v 0.03