Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Template Toolkit and DBI Changing Table Name by Variable

by merlyn (Sage)
on Nov 28, 2009 at 18:02 UTC ( [id://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.

Replies are listed 'Best First'.
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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://809925]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (3)
As of 2024-04-24 16:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found