php+mysql: copying a row from one table to another -


i'm having 2 tables table(fielda, fieldb, fieldc) , log_table(id, fielda, fieldb, fieldc). possible copy row table log_table 1 (not two: select , insert) query?

thank in advance!

you can use single insert statement passing select query instead of list of constant values:

insert log_table (select fielda, fieldb, fieldc table) 

Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -