Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • package TableOne;
    # set up columns and table here...
    __PACKAGE__->set_sql('by_join' => qq{
    select title, descr
    from table_1, table_2, table_3
    where table_1.pkey=table_2.fkey and date='2004-12-16' and
    table_1.pkey=table_3.fkey and
    field_3 = 'test'});
    # then, in some nearby code:
    my @table_ones = TableOne->search_by_join();
    Using SQL directly is what makes Class::DBI so useful, in my opinion. You always have an escape hatch when you need it.