The version of Phalcon
I am using is 1.3.3
I want to get the number of rows of a table :
function paginationCount($tab){
$config = array(
"host" => "localhost",
"dbname" => BDD,
"port" => 3306,
"username" => "root",
"password" => ""
);
$connection = new \Phalcon\Db\Adapter\Pdo\Mysql($config);
$nb = $connection->fetchColumn("SELECT COUNT(*) FROM ".$tab);
$connection->close();
return $nb;
}
At runtime I get an error saying that fetchColumn
is unknown ! So how to fix it ?