Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Template Toolkit and DBI Changing Table Name by Variable

by merlyn (Sage)
on Nov 28, 2009 at 18:02 UTC ( #809925=note: print w/ replies, xml ) Need Help??


in reply to Template Toolkit and DBI Changing Table Name by Variable

Use _ for concatenation.

[% sql = 'SELECT * FROM ' _ tablename; FOREACH fone = DBI.query(sql) %]

-- Randal L. Schwartz, Perl hacker

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.


Comment on Re: Template Toolkit and DBI Changing Table Name by Variable
Select or Download Code
Re^2: Template Toolkit and DBI Changing Table Name by Variable
by seekperlwisdom (Acolyte) on Nov 28, 2009 at 18:34 UTC
    thanks merlyn

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (15)
As of 2014-07-29 13:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (217 votes), past polls