|
|
| Do you know where your variables are? | |
| PerlMonks |
Re: Class::DBI exampleby salvadors (Pilgrim) |
| on Feb 11, 2002 at 05:16 UTC ( [id://144608]=note: print w/replies, xml ) | Need Help?? |
This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.
And, if you're using MySQL then the example can be even smaller:
package Song;
use base qw(Class::DBI::mysql);
__PACKAGE__->set_db( 'Main', 'dbi:mysql', 'username', 'password' );
__PACKAGE__->set_up_table('Song');
package main;
...
No need to declare your columns, as it will go ask the database for them. I keep meaning to find out how to do this for other databases, and roll them in ...
Tony
In Section
Cool Uses for Perl
|
|
||||||||||||||||||||||||||||