Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: DBI query where table name is a variable

by Thilosophy (Curate)
on Oct 23, 2007 at 07:04 UTC ( #646648=note: print w/ replies, xml ) Need Help??


in reply to DBI query where table name is a variable

You need to set $table before you call $dbh->prepare.

At that point, the table name gets expanded into the SQL string, and it will not change, even if you re-assign to $table.


Comment on Re: DBI query where table name is a variable
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (10)
As of 2014-12-21 17:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

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





    Results (106 votes), past polls