我的 PHP 脚本可以正常工作,如下所示:
while($row4 = mysql_fetch_array($result4))
{
if (($row4['Username'] != 'root') && ($row4['ToUpline'] == 1)){
if (!(($row4['Username'] != $MyUsername) && ($row4['Private'] == 1))){
//some other scripts here...
}};
另一方面,我已经有了 MySQL 命令的 WHERE 条件:
WHERE (NetworkTree.LeftNum <= $MyLeftNum AND NetworkTree.RightNum >= $MyRightNum)
AND MyBlackList.HideWho IS NULL
如何将这些 PHP 条件组合成 1 个 SQL 命令,以便我可以删除 PHP IF。谢谢...