To fix the issue you can do fetchAll will return a two-dimensional array. The first dimension is each row. The second dimension is each field (key/value pair) within that row. $resultset['fieldname'] will return the value of fieldname in the first row of the result set.
I think the issue was by ths following , I am writing my own simply ORM using PDO. My question is if you can force PDOStatement::fetchAll() method to return array of objects of stdClass? For example: , Use $result = $q->fetchAll(PDO::FETCH_OBJ);
Do ZeosLib DataSets need to perform FetchAll method to return real real total rows?
hop of those help? Zeos returns number of already fetched records. It does not take into account any applyed filters and does not do FetchAll before returning RecordCount. SELECT COUNT(*) ... is not "much more efficient", because it creates additional server workload, which sometimes may be equal to workload to execute an original query. In general, a data access library may offer 3 modes of record count calculation: the number of fetched rows, the number of visible rows (like first, but after applying filters), and SELECT COUNT(*). FetchAll or not FetchAll will be better to control explicitly. This is how this is done in AnyDAC (more).
PDO fetchAll returning empty array, but rowCount does return the real result