我这里有一个mysql代码 -
$querymypm = "SELECT * FROM pm WHERE recieverun='$uname' AND senderun='$c' ORDER BY pmid DESC";
但我想要这样 -
$querymypm = "SELECT * FROM pm WHERE recieverun='///(Taking more than one value)///' AND senderun='///(Taking more than one value)///' ORDER BY pmid DESC";
答案 0 :(得分:0)
使用IN
运算符。
$querymypm = "SELECT * FROM pm WHERE recieverun IN ('$uname1', '$uname2', '$uname3') AND senderun IN ('$c1', '$c2', '$c3') ORDER BY pmid DESC";