Hi
I see that RecordCount is not available in newer versions.Call to undefined method Doctrine\DBAL\Result::RecordCount()what is the best way to count number of rows in the Execute query?thanks
Depending on database type, you may try rowCount().You may want to catch up:
For PHPMaker v2024, you may simply try:
<?php
$RecordCount = 0;
$stmt = ExecuteQuery("SELECT ID FROM models"); // adjust to your SQL query
if ($stmt->rowCount() > 0) {
$RecordCount = $stmt->rowCount();
}
?>