Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Problem with table joins with Class::DBI

by Anarion (Hermit)
on Dec 24, 2003 at 16:38 UTC ( #316887=note: print w/ replies, xml ) Need Help??


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:
__PACKAGE__->set_sql('update', <<""); UPDATE __TABLE__ SET %s WHERE __IDENTIFIER__
and then construct the statement on the fly.

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:
sub my_sqlset { my ($self,$name,$statement) = @_; # escape your statement here $self->set_sql($name,$statement); }
You can use placeholders to use it latter in a similar search.

And perhaps use UNIVERSAL to check if you already created that function to not waste time.

$anarion=\$anarion;

s==q^QBY_^=,$_^=$[x7,print


Comment on Re: Problem with table joins with Class::DBI
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://316887]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (8)
As of 2015-07-04 18:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (60 votes), past polls