Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
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 lurking in the Monastery: (2)
As of 2014-09-22 04:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (178 votes), past polls