Старый ответ - косячный$pdo=new PDO(тут ваши данные для подключения к БД);
$result=$pdo->prepare("SELECT count(email) as cnt FROM clients WHERE email=:email GROUP BY email");
$result->execute(array(":email" => "bill@microsoft.com"));
print $result->rowCount();
$pdo=new PDO("mysql:dbname=test;host=localhost", "root", "");
$result=$pdo->prepare("SELECT count(email) as cnt FROM clients WHERE email=:email GROUP BY email");
$result->execute(array(":email" => "bill@microsoft.com"));
$row= $result->fetchAll(PDO::FETCH_ASSOC);
pritn $row[0]['cnt'];
либо так:
$pdo=new PDO("mysql:dbname=test;host=localhost", "root", "");
$result=$pdo->prepare("SELECT 1 FROM clients WHERE email=:email");
$result->execute(array(":email" => "bill@microsoft.com"));
print $result->rowCount();