Exemplo n.º 1
0
 /**
  * Static Qcodo Query method to query for a count of QcodoConstant objects.
  * Uses BuildQueryStatment to perform most of the work.
  * @param QQCondition $objConditions any conditions on the query, itself
  * @param QQClause[] $objOptionalClausees additional optional QQClause objects for this query
  * @param mixed[] $mixParameterArray a array of name-value pairs to perform PrepareStatement with
  * @return integer the count of queried objects as an integer
  */
 public static function QueryCount(QQCondition $objConditions, $objOptionalClauses = null, $mixParameterArray = null)
 {
     // Get the Query Statement
     try {
         $strQuery = QcodoConstant::BuildQueryStatement($objQueryBuilder, $objConditions, $objOptionalClauses, $mixParameterArray, true);
     } catch (QCallerException $objExc) {
         $objExc->IncrementOffset();
         throw $objExc;
     }
     // Perform the Query and return the row_count
     $objDbResult = $objQueryBuilder->Database->Query($strQuery);
     $strDbRow = $objDbResult->FetchRow();
     return QType::Cast($strDbRow[0], QType::Integer);
 }