ADOdb

Database Abstraction Layer for PHP

User Tools

Site Tools


v5:reference:connection:cachegetone

cacheGetOne

See Also

$ADODB_GETONE_EOF

Syntax
  mixed cacheGetOne(
     mixed $cacheSeconds,
     optional string $sql=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);
v5/reference/connection/cachegetone.txt · Last modified: 2016/01/17 01:29 by mnewnham