MySQL Forums
Forum List  »  Perl

Re: table name as variable in INSERT
Posted by: B A
Date: July 31, 2011 09:23AM

I did, and this is the error message I get now:

DBD::mysql::st execute failed: Table 'perltest.$table' doesn't exist at ptest.pl line 22.
SQL error:$DBI::errstr

my code now reads:
my $ins_rec="INSERT INTO \$table\ (symbol) VALUES(\'$name\');";

Options: ReplyQuote


Subject
Written By
Posted
B A
July 31, 2011 08:51AM
Re: table name as variable in INSERT
B A
July 31, 2011 09:23AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.