如何在 if else PHP 语句中使用“ AND/OR”? 它是:
1)及
if ($status = 'clear' AND $pRent == 0) {
mysql_query("UPDATE rent
SET dNo = '$id',
status = 'clear',
colour = '#3C0'
WHERE rent.id = $id");
}
2)或
if ($status = 'clear' OR $pRent == 0) {
mysql_query("UPDATE rent
SET dNo = '$id',
status = 'clear',
colour = '#3C0'
WHERE rent.id = $id");
}