开发者

PHP MYSQL copy one table to another table

Im using php mysql and i was wondering if any开发者_开发百科one can give me a format to copy from tableone 3 columns of data in a specific row to another table.


This is not about PHP this is about MySQL

The query is:

INSERT INTO dst (field1, field2, field3) SELECT field1, field2, field3 FROM src;

You can use mysqli or mysql to execute it in php


use insert into ... select syntax

http://dev.mysql.com/doc/refman/5.0/en/insert-select.html


http://dev.mysql.com/doc/refman/5.0/en/insert-select.html

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜