$result->count() is count users all rows.... how to know $result count?
docment is here
public int count ()
Counts how many rows are in the resultset
code is here
$phql="SELECT * FROM Users WHERE UserName = :username: AND Password=:password:";
$result =$this->modelsManager->executeQuery($phql,array('username' => $username,'password'=>$password));
//var_dump($result->toarray());die();
foreach ($result as $result)
{
echo $result->NickName, "\n";
echo $result->count(), "\n";
}
log is here
[Mon, 10 Feb 14 04:02:58 +0100][INFO] SELECT IF(COUNT(*)>0, 1 , 0) FROM `INFORMATION_SCHEMA`.`TABLES` WHERE `TABLE_NAME`='Users'
[Mon, 10 Feb 14 04:02:58 +0100][INFO] DESCRIBE `Users`
[Mon, 10 Feb 14 04:02:58 +0100][INFO] SELECT `Users`.`ID`, `Users`.`UserName`, `Users`.`Password`, `Users`.`NickName`, `Users`.`Email`, `Users`.`UserGroup`, `Users`.`UserACL` FROM `Users` WHERE `Users`.`UserName` = :username AND `Users`.`Password` = :password
[Mon, 10 Feb 14 04:02:58 +0100][INFO] SELECT COUNT(*) AS `rowcount` FROM `Users`