ADOdb

Database Abstraction Layer for PHP

User Tools

Site Tools


v5:reference:connection:cachegetassoc

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
reference:cachegetassoc [2015/08/01 17:40] – created mnewnhamv5:reference:connection:cachegetassoc [2016/01/17 01:36] (current) – ↷ Page moved from v5:reference:cachegetassoc to v5:reference:connection:cachegetassoc mnewnham
Line 13: Line 13:
  
 ===== Description ===== ===== Description =====
-If the first parameter passed is a positive integer, The function searches the query cached for matching statement to the $sql and bindvars. If the first parameter is an SQL statement, the function executes [[reference:getassoc|getAssoc()]].+Cache functions search for the results of an executed query in the query cache. The results of 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.
  
-The presentation of the returned data can be modified by the variable [[reference:adodb_assoc_case|$ADODB_ASSOC_CASE]]. +For an explanation of the syntax of the other parameter of ''cacheGetAssoc()'', see [[v5:reference:connection:getassoc|getAssoc()]]. 
- +--------------------------------- 
-For a detailed description of the SQL and bind parameters passed, see [[reference:cacheexecute|cacheExecute()]]. +===== Usage =====
- +
-In addition it should be noted that the presentation of the returned data is modified by the number of columns requested in the SQL statement and the setting of the optional parameters ''$forceArray'' and ''$first2Cols''+
- +
-==== Requesting two columns ==== +
-When 2 columns are requested, the first column becomes the key and the second the value.+
 <code php> <code php>
 /* /*
Line 42: Line 37:
                      
 </code> </code>
 +{{tag>[cache]}}
        
        
v5/reference/connection/cachegetassoc.1438443659.txt.gz · Last modified: 2017/04/21 11:36 (external edit)