ADOdb

Database Abstraction Layer for PHP

User Tools

Site Tools


v6:reference:connection:cachegetone

cacheGetOne

This function is deprecated in V6 and will be removed in a later release. Use getOne with caching parameters instead

See Also

$ADODB_GETONE_EOF

Syntax
  mixed cacheGetOne(
     mixed $cacheSeconds,
     optional string $sql=false
     optional array $bindvars=false
     )

Cache functions search for the results of an executed query in the query cache. The results of a query have an expiration time specified by the first parameter. If an unexpired cache result is not found, the query is cached for the specified period.

For an explanation of the syntax of the other parameter of cacheGetOne(), see getOne().


Usage

$ADODB_GETONE_EOF = "-1";
 
$SQL = "SELECT MAX(tickets) FROM arena WHERE zip_code = '80111'";
$maxTickets = $db->cacheGetOne(100,$SQL);
v6/reference/connection/cachegetone.txt · Last modified: by 127.0.0.1