我有这个查询:
SELECT COUNT(date) FROM patients WHERE date= 2012/02/23
如果那个 COUNT 返回 10,就会有一个警告告诉用户它不能接受更多的访问。我该如何验证?我怎么知道?在php中我只需要这样做:
<?php
$QUERY = "SELECT COUNT(date) AS count_results FROM patients WHERE date= 2012/02/23";
$execute_query = $CONEXION ->prepare($query);
$execute_query->execute();
$results = execute_query->fetch(PDO::FETCH_ASSOC);
if(results['count_results ']==10)
{
echo "Cannot accept know visit.";
}else{
echo "Ok";
}
?>
但我不知道如何在 ASP.NET C# 中做到这一点。帮助??