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