This function is deprecated in V6 and will be removed in a later release. Use execute with caching parameters instead
mixed cacheExecute {
int $cacheTimeInSeconds,
optional mixed $sql
optional string[] $bindvars
optional string $serverKey
}
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 ACTSELECT * 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) );