本文介绍了需要帮助来处理SQL查询的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有两个数据库表 一个缺少信息 其他人是Adpersoncontact i我正在使用missinfo表的插入查询作为
I have two database tables one is missing info otherone is Adpersoncontact i am using insert query for missinginfo table as
$reslt=mysql_query("insert into missinginfo(mfname,mlname,fathername,relation,photoid,sex,heightfeet,heightinch,agemonth,ageyear,haircolor,eyecolor,missingdate,city,id) values ('$mfisrtname','$mlastname','$mnickname','$rlation','$new','$sex','$heightfeet','$heightinch','$agemonth','$ageyear','$haircolor','$eyecolor','$misdate','$missfrom',(select id from account where userid='$userid'))") or die(mysql_error());我正在使用另一个插入查询在Adpersoncontact表中插入数据但是我想从该adpersoncontact表中的缺失信息表中插入missingid i有一个混乱Ø这个。 这里是对adpersoncontact的查询
I am using another insert query to insert data in Adpersoncontact table however i want to insert missingid from the missing info table in that adpersoncontact table i have a confusion on this. here is the query for adpersoncontact
$reslt1=mysql_query("insert into adpersoncontact(AdPersonName,adpersonLastnameAdPersonEmail,AdPersonAddress,AdPersonPhone,missingid) values ('rfirstname','$rlastname','$mail','$address','$contactno',(select missingid from missinginfo where missingid= ??????????'))") or die(mysql_error());推荐答案
reslt = mysql_query( 插入missinginfo(mfname,mlname,fathername,relation,photoid,sex,heightfeet,heightinch,agemonth,ageyear,haircolor,eyecolor,missingdate ,city,id)values(' reslt=mysql_query("insert into missinginfo(mfname,mlname,fathername,relation,photoid,sex,heightfeet,heightinch,agemonth,ageyear,haircolor,eyecolor,missingdate,city,id) values ('
mfisrtname',' mfisrtname','
mlastname',' mlastname','
更多推荐
需要帮助来处理SQL查询
发布评论