データベースに 2 つのテーブルがあり、ist テーブルの結果を使用して、次のように 2 番目のテーブルと比較したいと考えています。
// we connect to example.com and port 3307
mysql_connect("localhost", "root", "pass123") or die(mysql_error());
mysql_select_db("PhGateway") or die(mysql_error());
$result = mysql_query("select mtMsgId from SMS where SMS.`result` = '0' ");
while($row = mysql_fetch_array($result))
{
$mtMsgid=$row['mtMsgId'];
}
別のテーブルの結果を比較して表示したいのですが$mtMsgid
、他のテーブル名は DN で、次の
ような2 つのフィールドがmtMsgId
あります。msgStatus
select * from DN where mtMsgId = 'the whole above result'