Looks a little bit around the mouth, for instance,
Two tables with different field names
Field GS and another table GSMC some of the values are the same
All we have to do is find the same value.
Will write this SQL statement can be
Just write the key.
$sql 2= "Select GS from Yixiangkh where GS in (select GSMC from Qiandan)" ; //Execution $result 2=$db->query ($sql 2, 0); //Fetch Data $attr 2=$result 2-Fetch_all ();//var_dump ($attr 2[0][0]); foreach($attr 2 as $v) { Echo"<div style= ' color:red ' > where "$v[0] "Signed!" </div>";}
This will allow the output to be successful.
If there are different users like me who have logged in, such as this
The maintainer is the one who logged in, the SQL statement can be written like this
$sql 2 = "Select GS from Yixiangkh where whr = ' {$xm} ' and GS in (select GSMC from Qiandan)";
Of course, the $XM here are here.
Should be able to understand, do not understand can be private chat, hope to help you
Take two of the same values for two fields in a MySQL table