Saturday, 15 March 2014

php - Select a table and create a table with the data similar to selected table -



php - Select a table and create a table with the data similar to selected table -

i wanted create table info similar table have selected. code below works create table column there no datas inserted

php code

if(isset($_post['select_table'])) { //$select_db = $_post['select_db']; $select_table = $_post['select_table']; $db = mysql_select_db('section_masterfile',$connectdatabase); $query_select = "create table pdf_table (select * $select_table)"; $create_query = mysql_query($query_select,$connectdatabase); }

try query:

create table pdf_table $select_table; insert pdf_table select * $select_table;

source

php mysql sql

No comments:

Post a Comment