用 AND 或者 Having
但是你的代码很不规范 而且很不安全 很容易给人sql注入
用下 mysql_real_escape_string 吧
$mc=mysql_real_escape_string($_GET['mc']);
$phone=mysql_real_escape_string($_GET['phone']);
$count=$db->getRow("SELECT COUNT(*) FROM sales_orders WHERE mcbh LIKE '{$mc}' AND consignee_phone ='{$phone } ' ");
$a = 1;
$b = 2;
if ($a == 1 && $b == 2) {
//这样就同时满足2个条件了
}
where mcbh = '{$_GET['mc']}' and consignee_phone = '{$_GET['phone']}'
加个 and 不就可以继续写条件了1