當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Person::QueryCount方法代碼示例

本文整理匯總了PHP中Person::QueryCount方法的典型用法代碼示例。如果您正苦於以下問題:PHP Person::QueryCount方法的具體用法?PHP Person::QueryCount怎麽用?PHP Person::QueryCount使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Person的用法示例。


在下文中一共展示了Person::QueryCount方法的12個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: dtgPersons_Bind

 protected function dtgPersons_Bind()
 {
     // We must first let the datagrid know how many total items there are
     $this->dtgPersons->TotalItemCount = Person::QueryCount($this->dtgPersons->Conditions);
     // Next, we must be sure to load the data source, passing in the datagrid's
     // limit info into our loadall method.
     $this->dtgPersons->DataSource = Person::QueryArray($this->dtgPersons->Conditions, QQ::Clause($this->dtgPersons->OrderByClause, $this->dtgPersons->LimitClause));
 }
開發者ID:tomVertuoz,項目名稱:framework,代碼行數:8,代碼來源:filtering.php

示例2: BindData

 protected function BindData()
 {
     if ($strFilter = $this->dtgTable->Search["search"]) {
         $objCondition = QQ::OrCondition(QQ::Like(QQN::Person()->FirstName, '%' . $strFilter . '%'), QQ::Like(QQN::Person()->LastName, '%' . $strFilter . '%'));
     } else {
         $objCondition = QQ::All();
     }
     $this->dtgTable->TotalItemCount = Person::QueryCount($objCondition);
     $objClauses[] = $this->dtgTable->OrderByClause;
     $objClauses[] = $this->dtgTable->LimitClause;
     $this->dtgTable->DataSource = Person::QueryArray($objCondition, $objClauses);
 }
開發者ID:qcubed,項目名稱:plugin_datatables,代碼行數:12,代碼來源:datatables2.php

示例3: dtgMembers_Bind

 public function dtgMembers_Bind()
 {
     $objCondition = QQ::In(QQN::Person()->GroupParticipation->GroupId, $this->intGroupIdArray);
     $objCondition = QQ::AndCondition($objCondition, QQ::IsNull(QQN::Person()->GroupParticipation->DateEnd));
     $this->dtgMembers->TotalItemCount = Person::QueryCount($objCondition);
     $objClauses = array(QQ::Distinct());
     if ($objClause = $this->dtgMembers->LimitClause) {
         $objClauses[] = $objClause;
     }
     if ($objClause = $this->dtgMembers->OrderByClause) {
         $objClauses[] = $objClause;
     }
     $this->dtgMembers->DataSource = Person::QueryArray($objCondition, $objClauses);
 }
開發者ID:alcf,項目名稱:chms,代碼行數:14,代碼來源:CpGroup_ViewGroupCategory.class.php

示例4: dtgMembers_Bind

 public function dtgMembers_Bind()
 {
     $objConditions = QQ::Equal(QQN::Person()->GroupParticipation->GroupId, $this->objGroup->Id);
     $this->dtgMembers->TotalItemCount = Person::QueryCount($objConditions);
     if ($strName = trim($this->txtFirstName->Text)) {
         $objConditions = QQ::AndCondition($objConditions, QQ::Like(QQN::Person()->FirstName, $strName . '%'));
     }
     if ($strName = trim($this->txtLastName->Text)) {
         $objConditions = QQ::AndCondition($objConditions, QQ::Like(QQN::Person()->LastName, $strName . '%'));
     }
     $objClauses = array(QQ::Distinct());
     if ($objClause = $this->dtgMembers->LimitClause) {
         $objClauses[] = $objClause;
     }
     if ($objClause = $this->dtgMembers->OrderByClause) {
         $objClauses[] = $objClause;
     }
     $this->dtgMembers->DataSource = Person::QueryArray($objConditions, $objClauses);
 }
開發者ID:alcf,項目名稱:chms,代碼行數:19,代碼來源:CpGroup_ViewSmartGroup.class.php

示例5: RenderCount

 public function RenderCount($objGroup)
 {
     // Count differently if it's a group Category or Growth Group
     if ($objGroup->Type == GroupType::$NameArray[GroupType::GroupCategory]) {
         // Setup Group Array
         $objGroupArray = $objGroup->GetThisAndChildren();
         $intGroupIdArray = array();
         foreach ($objGroupArray as $objGroup) {
             $intGroupIdArray[] = $objGroup->Id;
         }
         $objCondition = QQ::In(QQN::Person()->GroupParticipation->GroupId, $intGroupIdArray);
         $objCondition = QQ::AndCondition($objCondition, QQ::IsNull(QQN::Person()->GroupParticipation->DateEnd));
         $strReturn = Person::QueryCount($objCondition);
         return "<b>" . $strReturn . "</b>";
     } else {
         $objCondition = QQ::Equal(QQN::Person()->GroupParticipation->GroupId, $objGroup->Id);
         $objCondition = QQ::AndCondition($objCondition, QQ::IsNull(QQN::Person()->GroupParticipation->DateEnd));
         return Person::QueryCount($objCondition);
     }
 }
開發者ID:alcf,項目名稱:chms,代碼行數:20,代碼來源:gg_report.php

示例6: IsNameItemAssociated

 /**
  * Checks to see if an association exists with a specific NameItem
  * @param NameItem $objNameItem
  * @return bool
  */
 public function IsNameItemAssociated(NameItem $objNameItem)
 {
     if (is_null($this->intId)) {
         throw new QUndefinedPrimaryKeyException('Unable to call IsNameItemAssociated on this unsaved Person.');
     }
     if (is_null($objNameItem->Id)) {
         throw new QUndefinedPrimaryKeyException('Unable to call IsNameItemAssociated on this Person with an unsaved NameItem.');
     }
     $intRowCount = Person::QueryCount(QQ::AndCondition(QQ::Equal(QQN::Person()->Id, $this->intId), QQ::Equal(QQN::Person()->NameItem->NameItemId, $objNameItem->Id)));
     return $intRowCount > 0;
 }
開發者ID:alcf,項目名稱:chms,代碼行數:16,代碼來源:PersonGen.class.php

示例7: _p

// Notice that QuerySingle returned just a single Person object
_p($objPerson->FirstName . ' ' . $objPerson->LastName);
_p('<br/>', false);
?>



	<h3>QueryArray Example</h3>
<?php 
$objPersonArray = Person::QueryArray(QQ::In(QQN::Person()->Id, array(5, 6, 8)));
// Notice that QueryArray returns an array of Person objects... this will
// be true even if the result set only yields 1 row.=
foreach ($objPersonArray as $objPerson) {
    _p($objPerson->FirstName . ' ' . $objPerson->LastName);
    _p('<br/>', false);
}
?>



	<h3>QueryCount Example</h3>
<?php 
$intCount = Person::QueryCount(QQ::In(QQN::Person()->Id, array(5, 6, 8)));
// Notice that QueryCount returns an integer
_p($intCount . ' rows.');
?>



<?php 
require __INCLUDES__ . '/examples/footer.inc.php';
開發者ID:qcodo,項目名稱:qcodo,代碼行數:31,代碼來源:qq.php

示例8: IsTopicAsReadAssociated

 /**
  * Checks to see if an association exists with a specific TopicAsRead
  * @param Topic $objTopic
  * @return bool
  */
 public function IsTopicAsReadAssociated(Topic $objTopic)
 {
     if (is_null($this->intId)) {
         throw new QUndefinedPrimaryKeyException('Unable to call IsTopicAsReadAssociated on this unsaved Person.');
     }
     if (is_null($objTopic->Id)) {
         throw new QUndefinedPrimaryKeyException('Unable to call IsTopicAsReadAssociated on this Person with an unsaved Topic.');
     }
     $intRowCount = Person::QueryCount(QQ::AndCondition(QQ::Equal(QQN::Person()->Id, $this->intId), QQ::Equal(QQN::Person()->TopicAsRead->TopicId, $objTopic->Id)));
     return $intRowCount > 0;
 }
開發者ID:qcodo,項目名稱:qcodo-website,代碼行數:16,代碼來源:PersonGen.class.php

示例9: CountForMemberSearch

 public static function CountForMemberSearch($strDisplayName)
 {
     return Person::QueryCount(QQ::Like(QQN::Person()->DisplayName, '%' . $strDisplayName . '%'));
 }
開發者ID:klucznik,項目名稱:qcodo-website,代碼行數:4,代碼來源:Person.class.php

示例10: MetaDataBinder

 /**
  * Main utility method to aid with data binding.  It is used by the default BindAllRows() databinder but
  * could and should be used by any custom databind methods that would be used for instances of this
  * MetaDataGrid, by simply passing in a custom QQCondition and/or QQClause. 
  *
  * If a paginator is set on this DataBinder, it will use it.  If not, then no pagination will be used.
  * It will also perform any sorting (if applicable).
  *
  * @param QQCondition $objConditions override the default condition of QQ::All() to the query, itself
  * @param QQClause[] $objOptionalClauses additional optional QQClause object or array of QQClause objects for the query		 
  * @return void
  */
 public function MetaDataBinder(QQCondition $objCondition = null, $objOptionalClauses = null)
 {
     // Setup input parameters to default values if none passed in
     if (!$objCondition) {
         $objCondition = QQ::All();
     }
     $objClauses = $objOptionalClauses ? $objOptionalClauses : array();
     // We need to first set the TotalItemCount, which will affect the calcuation of LimitClause below
     if ($this->Paginator) {
         $this->TotalItemCount = Person::QueryCount($objCondition, $objClauses);
     }
     // If a column is selected to be sorted, and if that column has a OrderByClause set on it, then let's add
     // the OrderByClause to the $objClauses array
     if ($objClause = $this->OrderByClause) {
         array_push($objClauses, $objClause);
     }
     // Add the LimitClause information, as well
     if ($objClause = $this->LimitClause) {
         array_push($objClauses, $objClause);
     }
     // Set the DataSource to be a Query result from Person, given the clauses above
     $this->DataSource = Person::QueryArray($objCondition, $objClauses);
 }
開發者ID:qcodo,項目名稱:qcodo-website,代碼行數:35,代碼來源:PersonDataGridGen.class.php

示例11: CountByCountryId

 /**
  * Count People
  * by CountryId Index(es)
  * @param integer $intCountryId
  * @return int
  */
 public static function CountByCountryId($intCountryId)
 {
     // Call Person::QueryCount to perform the CountByCountryId query
     return Person::QueryCount(QQ::Equal(QQN::Person()->CountryId, $intCountryId));
 }
開發者ID:qcodo,項目名稱:qcodo-api,代碼行數:11,代碼來源:PersonGen.class.php

示例12: dtgMembers_Bind

 public function dtgMembers_Bind()
 {
     if ($this->chkViewAll->Checked) {
         $objCondition = QQ::Equal(QQN::Person()->GroupParticipation->GroupId, $this->objGroup->Id);
     } else {
         $objCondition = QQ::AndCondition(QQ::Equal(QQN::Person()->GroupParticipation->GroupId, $this->objGroup->Id), QQ::IsNull(QQN::Person()->GroupParticipation->DateEnd));
     }
     $this->dtgMembers->TotalItemCount = Person::QueryCount($objCondition);
     $objClauses = array(QQ::Distinct());
     if ($objClause = $this->dtgMembers->LimitClause) {
         $objClauses[] = $objClause;
     }
     if ($objClause = $this->dtgMembers->OrderByClause) {
         $objClauses[] = $objClause;
     }
     $this->dtgMembers->DataSource = Person::QueryArray($objCondition, $objClauses);
 }
開發者ID:alcf,項目名稱:chms,代碼行數:17,代碼來源:CpGroup_ViewGrowthGroup.class.php


注:本文中的Person::QueryCount方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。