Use of $ADODB_FETCH_MODE and setFetchMode() is incompatible with use of cached result sets as the results of the cached query are stored using the original fetch mode settings.
mixed cacheExecute { mixed $cacheTimeInSeconds, optional mixed $sql optional string[] $bindvars }
The function executes a statement and returns a handle to a recordset or false if the statement execution fails.
The first parameter can be either:
SELECT * FROM ACT
SELECT * FROM ACT WHERE empno>:emp
, in which case the second parameter is an array containing the bind variableseither the SQL statement or if set, an array of bind variables.
if set, an array of bind variables.
If the execution succeeds, it returns a recordset. This recordset can be used by functions such as getUpdateSQL() or fetchRow(). if the execution fails, it returns false. You can access errors using errorMsg().
/* * Connection assumed */ $result = $db->cacheExecute(6000,"SELECT * FROM ACT"); or: $result = $db->cacheExecute("SELECT * FROM ACT WHERE empno > :emp", array('emp'=>1234) );