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

Re: Insering into 2 tables?

by Sifmole (Chaplain)
on Jan 23, 2003 at 20:41 UTC ( #229421=note: print w/ replies, xml ) Need Help??

in reply to Insering into 2 tables?

If you put both statements in a single string, seperated by a semi-colon this should work. I am not saying this is a good way of doing it, but for informations sake:

my $SQL1 = "INSERT INTO property (address_1, address_2, county, cit +y, zip, description, status, bedroom) VALUES ('$address_1', '$address +_2', '$county', '$city', '$zip', '$description', '$status', '$bedroom +'); INSERT INTO property2 (address_1, address_2, county, city, zip, d +escription, status, bedroom) VALUES ('$address_1', '$address_2', '$co +unty', '$city', '$zip', '$description', '$status', '$bedroom')"; my $sth= $dbh->prepare($SQL1) or die $dbh->errstr;

Comment on Re: Insering into 2 tables?
Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (7)
As of 2015-11-25 10:29 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (673 votes), past polls