4
I’m doing a query and need to count the number of returned lines, I’m not usually used to doing this in PDO, follow my code below.
$sqlCODCEL = $conn->prepare("SELECT * FROM tbl_CELULAS WHERE TXT_CODIG_SECUR = :codCEL");
$sqlCODCEL->bindParam(":codCEL", $lbl_CODCELULA);
$linha = $sqlCODCEL->fetchAll();
$count = count_chars($linha);
error_log($count);