Forum Moderators: open

Message Too Old, No Replies

Duplicating an entry in Mysql

         

robot52

10:35 am on Aug 30, 2007 (gmt 0)

10+ Year Member



Hi everyone... I wonder if you can help me with this simple query...

I've got a mysql database with several tables, one of which is articles. In the PHP front end to this database I have placed a copy button which just copies an article. So far I have been using a query to create php variables of all the fields and then running another query as a simple insert script back into the database.

This seems clumsy and I was wondering if I can just pass a single query to mysql that copies the complete entry...?

Thanks for your help!

mattur

9:41 pm on Sep 1, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Use INSERT... SELECT... syntax

robot52

3:48 pm on Sep 3, 2007 (gmt 0)

10+ Year Member



Thanks for your help