table field Replication Issues
Now there are table A and table B
A structure
ID Username Genre pattern
1 MR.A 0 Sales
2 MR.B 1 Manager
3 MR.C 0 Sales
B structure
ID model field Name setting CSS
1 area
Now I want to copy the a table field into the B record,
The following structure:
ID model field Name setting CSS
1 area
2 Username user Name
3 genre Sex
4 Pattern Positions
The manual didn't turn out, the novice consulted
------Solution--------------------
$link = mysql_connect ("localhost", "root", "pwd") or Die ("Could Not connect:". Mysql_error ());
mysql_select_db ("DbName", $link);
$result = mysql_query ("Show fields from TableName") or Die ("Could not query:". Mysql_error ());
while ($re = Mysql_fetch_array ($result)) {
echo $re [0];
Echo '
';
}
Mysql_close ($link);
Get the information of the fields in the table, how to deal with the landlord to write their own sentences decided