in reply to Problem with table joins with Class::DBI
You can do various things. According to documentation of Class::DBI you can use something like:
You can use the set_sql method on the fly to create it using a function on the base class of your Class::DBI classes to construct the statements too, something like:
And perhaps use UNIVERSAL to check if you already created that function to not waste time.
$anarion=\$anarion;
s==q^QBY_^=,$_^=$[x7,print
and then construct the statement on the fly.__PACKAGE__->set_sql('update', <<""); UPDATE __TABLE__ SET %s WHERE __IDENTIFIER__
You can use the set_sql method on the fly to create it using a function on the base class of your Class::DBI classes to construct the statements too, something like:
You can use placeholders to use it latter in a similar search.sub my_sqlset { my ($self,$name,$statement) = @_; # escape your statement here $self->set_sql($name,$statement); }
And perhaps use UNIVERSAL to check if you already created that function to not waste time.
$anarion=\$anarion;
s==q^QBY_^=,$_^=$[x7,print
|
---|
In Section
Seekers of Perl Wisdom