Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Copy column

by jeanluca (Deacon)
on Oct 01, 2007 at 21:26 UTC ( #642003=note: print w/ replies, xml ) Need Help??


in reply to Copy column

I'm not sure what you're trying, is that perl!
Have a look at the Mysql manual (http://dev.mysql.com/doc/refman/5.0/en/insert-select.html)
Here is an attempt of what I think you're trying

my $sql = "INSERT INTO $db.$table (category) SELECT $oldtable.category + FROM $oldtable" ;
If this isn't what you're looking for! please ignore me :-)

Cheers
LuCa


Comment on Re: Copy column
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (14)
As of 2015-07-31 17:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (279 votes), past polls