padawan_linuxero has asked for the wisdom of the Perl Monks concerning the following question:
Hello !!!
For a project in the work I need to create a few tables as backups so I need to create them from perl, in mysql I can go and do this :
On perl I try to put every thing like this
but when I try to do it in perl did not work Why?DROP TABLE IF EXISTS newtable; CREATE TABLE newtable SELECT T.time, T.name, T.last, P.company, P.wife FROM T JOIN P ON T.wife = P.wife and T.company = P.company;
On perl I try to put every thing like this
$sql="DROP TABLE IF EXISTS newtable; CREATE TABLE newtable SELECT T.time, T.name, T.last, P.company, P.wife FROM T JOIN P ON T.wife = P.wife and T.company = P.company"; $sth = $dbh->prepare($sql); $sth->execute (); $sth->finish (); $dbh->disconnect ();
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Create a table in Mysql with perl
by ikegami (Patriarch) on Nov 07, 2007 at 20:39 UTC | |
Re: Create a table in Mysql with perl
by mje (Curate) on Nov 07, 2007 at 22:14 UTC | |
Re: Create a table in Mysql with perl
by KurtSchwind (Chaplain) on Nov 07, 2007 at 23:36 UTC |
Back to
Seekers of Perl Wisdom