Mysql PHP Insert multiple data in 1(one) query
<?
$sql = ' INSERT INTO tablename ( fieldA , fieldB ) VALUES ( dataA1 , dataB1 ), ( dataA2 , dataB2)';
$result = mysql_query($sql);
?>
Insert/copy data from other to another table
<?
$sql = ' INSERT INTO tableA SELECT * FROM tableB ';
$result = mysql_query($sql);
?>
No comments:
Post a Comment