예제 #1
0
 public static function QueryArrayCached(QQCondition $objConditions, $objOptionalClauses = null, $mixParameterArray = null, $blnForceUpdate = false)
 {
     // Get the Database Object for this Class
     $objDatabase = Word::GetDatabase();
     $strQuery = Word::BuildQueryStatement($objQueryBuilder, $objConditions, $objOptionalClauses, $mixParameterArray, false);
     $objCache = new QCache('qquery/word', $strQuery);
     $cacheData = $objCache->GetData();
     if (!$cacheData || $blnForceUpdate) {
         $objDbResult = $objQueryBuilder->Database->Query($strQuery);
         $arrResult = Word::InstantiateDbResult($objDbResult, $objQueryBuilder->ExpandAsArrayNodes, $objQueryBuilder->ColumnAliasArray);
         $objCache->SaveData(serialize($arrResult));
     } else {
         $arrResult = unserialize($cacheData);
     }
     return $arrResult;
 }