如何根据table1 id(autoincrement)列将值添加到table2中 [英] How to add values into table2 based on the table1 id(autoincrement) column
本文介绍了如何根据table1 id(autoincrement)列将值添加到table2中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的问题是如何根据Php中table1中的id列将值添加到table2中
表1:tbl_Projects(Pid (自动增量),Pname,PNo)
表2:tbl_AddfloorPlans(pid,FloorNo,MapUrl)(注:Pid不从前端插入)
如何在php中执行此操作
请帮助我
My Problem is How to add values into table2 based on the id column in table1 in Php
Table1:tbl_Projects(Pid(auto-increment),Pname,PNo)
Table2:tbl_AddfloorPlans(pid,FloorNo,MapUrl)(Note:Pid not inserting from front end)
How to do this in php
Please Help me
推荐答案
if u just want id from table1 then simply do this.
global
sid ;
sid;
r = mysql_query( 从tbl1中选择id);
while(
r = mysql_query("select id from tbl1); while(
这篇关于如何根据table1 id(autoincrement)列将值添加到table2中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文