Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
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 cooling their heels in the Monastery: (12)
As of 2014-12-26 00:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (163 votes), past polls