需要帮助来处理SQL查询

编程入门 行业动态 更新时间:2024-10-25 21:15:27
本文介绍了需要帮助来处理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查询

本文发布于:2023-10-26 23:11:11,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1531625.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:SQL

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!