1
I’m trying to get the number of lines a Select
to show or not some messages to the user, but all possible attempts did not return me the correct result.
What I’m using is a William Francisco Leite class that suits me perfectly, but I can’t get the total lines as desired.
What I got is this:
// CONEXÃO PDO $pdo = Conexao::getInstance(); $crud = Crud::getInstance($pdo, 'cadDolar');
The code of the search:
$sqlMaxDolar = "SELECT DATE_FORMAT(MAX(Data),'%Y-%m-%d') as DataDolar FROM cadDolar"; $arrayParam = array(); $ResMaxDolar = $crud->getSQLGeneric($sqlMaxDolar, $arrayParam, TRUE); $QtdeMaxDolar = count($ResMaxDolar);
At your suggestion:
print_r($ResMaxDolar); Resultado: Array ( )
The result of this query should be 1 but is returning 0.
I’ve tried with the rowCount
, but the manual itself says that it is not reliable to use .
Gave a print_r(Resmaxdolar); to check if it is locating any database record?
– HENRIQUE LOBO