Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Create a table in Mysql with perl

by KurtSchwind (Chaplain)
on Nov 07, 2007 at 23:36 UTC ( [id://649593]=note: print w/replies, xml ) Need Help??


in reply to Create a table in Mysql with perl

I agree with the other comments. All you need to do is change your code to:
$dbh->do("DROP TABLE IF EXISTS newtable"); $sql="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 ();

Breaking the statements into 2 distinct calls.
--
I used to drive a Heisenbergmobile, but every time I looked at the speedometer, I got lost.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2024-04-19 05:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found