我有一个计算多行的查询:
$query = "SELECT COUNT (D.grouper) FROM (Select Distinct grouper FROM Operateurs WHERE ".implode(' AND ',$where)." ) D";
当行数超过1时工作正常,当行数= 1时没有返回!!
$stmt1->execute();
$count = $stmt1->fetchColumn();
WHEN Clause
的数据来自表单,我正在使用SQL Server 2008.