Hello John,
many thanks for your help, the only part I don't understand is why I need a new
DB object:
> sub generate_invoice_number
> {
> my $class = shift;
> my $db = My::DB->new; # Rose::DB subclass
Why not just use the default here?
> my $num;
>
> eval
> {
> my $table = My::InvoiceNumber->meta->table;
> my $year = (localtime(time))[5] + 1900;
>
> $db->dbh->do("LOCK $table ...");
>
> my $nums =
> $class->get_numbers(db => $db,
> query => [ year => $year ]);
Well, here actually.
> [... lots of very advanced stuff ...]
I will look at this, when my skills have improved a bit ;-)
Thanks,
Michael
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Rose-db-object mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rose-db-object