根据另一个表中的单元格,一次将数据插入到更多表中

时间:2014-12-06 08:36:52

标签: php mysql

我将数据插入2个表格。

$query1="INSERT INTO business (id) VALUES ('$id')";
$result1=mysql_query($query1);

$query2="INSERT INTO premier (id) VALUES ('$id')";
$result2=mysql_query($query2);

我有第三个表(table_list),其中列出了这两个表(business,premier)。我如何使用第三个表(table_list)将数据插入这些表而不必使用2个查询。

由于

0 个答案:

没有答案
相关问题