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 reply to Re: Class::DBI example
by salvadors
in thread Save MP3 Tag's to Database with SPOPS
by jeffa
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |