Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
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 2015-07-06 19:12 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 (81 votes), past polls