当前位置: 首页>>代码示例>>PHP>>正文


PHP QQ::Like方法代码示例

本文整理汇总了PHP中QQ::Like方法的典型用法代码示例。如果您正苦于以下问题:PHP QQ::Like方法的具体用法?PHP QQ::Like怎么用?PHP QQ::Like使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在QQ的用法示例。


在下文中一共展示了QQ::Like方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: dtgWikiItems_Bind

 public function dtgWikiItems_Bind()
 {
     $objCondition = QQ::All();
     if (trim($this->txtTitle->Text)) {
         $objCondition = QQ::AndCondition($objCondition, QQ::Like(QQN::WikiItem()->CurrentName, '%' . trim($this->txtTitle->Text) . '%'));
     }
     if ($strPath = trim($this->txtPath->Text)) {
         $strPath = WikiItem::SanitizeForPath($strPath, $intWikiItemTypeId);
         $objCondition = QQ::AndCondition($objCondition, QQ::Like(QQN::WikiItem()->Path, $strPath . '%'));
     }
     if ($intValue = $this->lstWikiItemType->SelectedValue) {
         $objCondition = QQ::AndCondition($objCondition, QQ::Equal(QQN::WikiItem()->WikiItemTypeId, $intValue));
     }
     if (trim($this->txtPostedBy->Text)) {
         $objCondition = QQ::AndCondition($objCondition, QQ::Like(QQN::WikiItem()->CurrentPostedByPerson->DisplayName, trim($this->txtPostedBy->Text) . '%'));
     }
     $this->dtgWikiItems->TotalItemCount = WikiItem::QueryCount($objCondition);
     $objClauses = array();
     if ($objClause = $this->dtgWikiItems->LimitClause) {
         $objClauses[] = $objClause;
     }
     if ($objClause = $this->dtgWikiItems->OrderByClause) {
         $objClauses[] = $objClause;
     }
     $this->dtgWikiItems->DataSource = WikiItem::QueryArray($objCondition, $objClauses);
 }
开发者ID:qcodo,项目名称:qcodo-website,代码行数:26,代码来源:directory.php

示例2: txtSearch_KeyUp

 public function txtSearch_KeyUp()
 {
     if (strlen($this->txtSearch->Text) < 2 || preg_match("/^'.*'\$/", $this->txtSearch->Text) || preg_match('/^".*"$/', $this->txtSearch->Text)) {
         $this->dtgSuggestion->AdditionalConditions = QQ::AndCondition(QQ::Equal(QQN::NarroSuggestion()->LanguageId, $this->lstLanguage->SelectedValue), QQ::Like(QQN::NarroSuggestion()->Text->TextValue, substr($this->txtSearch->Text, 1, -1)));
     } else {
         $this->dtgSuggestion->AdditionalConditions = QQ::AndCondition(QQ::Equal(QQN::NarroSuggestion()->LanguageId, $this->lstLanguage->SelectedValue), QQ::Like(QQN::NarroSuggestion()->Text->TextValue, '%' . $this->txtSearch->Text . '%'));
     }
     $this->dtgSuggestion->Refresh();
 }
开发者ID:Jobava,项目名称:narro,代码行数:9,代码来源:NarroSuggestionSearchPanel.class.php

示例3: testSelectSubsetInExpand

 public function testSelectSubsetInExpand()
 {
     $objPersonArray = Person::QueryArray(QQ::OrCondition(QQ::Like(QQN::Person()->ProjectAsManager->Name, '%ACME%'), QQ::Like(QQN::Person()->ProjectAsManager->Name, '%HR%')), QQ::Clause(QQ::Select(QQN::Person()->LastName), QQ::Expand(QQN::Person()->ProjectAsManager, null, QQ::Select(QQN::Person()->ProjectAsManager->Spent)), QQ::OrderBy(QQN::Person()->LastName, QQN::Person()->FirstName)));
     foreach ($objPersonArray as $objPerson) {
         $this->assertNull($objPerson->FirstName, "FirstName should be null, since it was not selected");
         $this->assertNotNull($objPerson->Id, "Id should not be null since it's always added to the select list");
         $this->assertNotNull($objPerson->_ProjectAsManager->Id, "ProjectAsManager->Id should not be null since id's are always added to the select list");
         $this->assertNull($objPerson->_ProjectAsManager->Name, "ProjectAsManager->Name should be null since it was not selected");
     }
 }
开发者ID:hiptc,项目名称:dle2wordpress,代码行数:10,代码来源:ExpandAsArrayTests.php

示例4: auto_Bind

 public function auto_Bind($strFormId, $strControlId, $term)
 {
     $cond = QQ::OrCondition(QQ::Like(QQN::Person()->FirstName, '%' . $term . '%'), QQ::Like(QQN::Person()->LastName, '%' . $term . '%'));
     $a = Person::QueryArray($cond);
     $items = array();
     foreach ($a as $obj) {
         $items[] = new QListItem($obj->FirstName . ' ' . $obj->LastName, $obj->Id);
     }
     $this->auto2->DataSource = $items;
 }
开发者ID:vaibhav-kaushal,项目名称:qc-framework,代码行数:10,代码来源:ui_select.php

示例5: 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

示例6: GetAssetLog

 protected function GetAssetLog()
 {
     $objClauses = array();
     array_push($objClauses, QQ::OrderBy(QQN::Assetsauditlog()->RealReturnDate));
     if ($this->txtSearchTerm->Text == "") {
         $condition = QQ::Equal(QQN::Assetsauditlog()->Owner, $_SESSION['User']);
         $myassets = Assetsauditlog::QueryArray($condition, $objClauses);
     } else {
         $objCondition = QQ::AndCondition(QQ::OrCondition(QQ::Like(QQN::Assetsauditlog()->Asin, '%' . $this->txtSearchTerm->Text . '%'), QQ::Like(QQN::Assetsauditlog()->Email, '%' . $this->txtSearchTerm->Text . '%'), QQ::Like(QQN::Assetsauditlog()->Title, '%' . $this->txtSearchTerm->Text . '%'), QQ::Like(QQN::Assetsauditlog()->FullName, '%' . $this->txtSearchTerm->Text . '%')), QQ::Equal(QQN::Assetsauditlog()->Owner, $_SESSION['User']));
         $objDbResult = Assetsauditlog::QueryArray($objCondition, $objClauses);
         $myassets = $objDbResult;
     }
     return $myassets;
 }
开发者ID:sarapsg,项目名称:prayuj,代码行数:14,代码来源:AssetLog.php

示例7: dtgBatches_Bind

 protected function dtgBatches_Bind()
 {
     $objCondition = QQ::All();
     if (strlen($strText = trim($this->txtDescription->Text))) {
         $objCondition = QQ::AndCondition($objCondition, QQ::Like(QQN::StewardshipBatch()->Description, $strText . '%'));
     }
     if ($this->lstCreatedBy->SelectedValue) {
         $objCondition = QQ::AndCondition($objCondition, QQ::Equal(QQN::StewardshipBatch()->CreatedByLoginId, $this->lstCreatedBy->SelectedValue));
     }
     if ($this->lstStatus->SelectedValue) {
         $objCondition = QQ::AndCondition($objCondition, QQ::Equal(QQN::StewardshipBatch()->StewardshipBatchStatusTypeId, $this->lstStatus->SelectedValue));
     }
     $this->dtgBatches->MetaDataBinder($objCondition);
 }
开发者ID:alcf,项目名称:chms,代码行数:14,代码来源:batches.php

示例8: Form_Create

 protected function Form_Create()
 {
     // Define the DataGrid
     $this->dtgPersons = new QDataGrid($this);
     $this->dtgPersons->ShowFilter = true;
     // To create pagination, we will create a new paginator, and specify the datagrid
     // as the paginator's parent.  (We do this because the datagrid is the control
     // who is responsible for rendering the paginator, as opposed to the form.)
     $objPaginator = new QPaginator($this->dtgPersons);
     $this->dtgPersons->Paginator = $objPaginator;
     // Now, with a paginator defined, we can set up some additional properties on
     // the datagrid.  For purposes of this example, let's make the datagrid show
     // only 5 items per page.
     $this->dtgPersons->ItemsPerPage = 20;
     // Define Columns
     $idCol = new QDataGridColumn('Person ID', '<?= $_ITEM->Id ?>', 'Width=100', array('OrderByClause' => QQ::OrderBy(QQN::Person()->Id), 'ReverseOrderByClause' => QQ::OrderBy(QQN::Person()->Id, false)));
     $idCol->Filter = QQ::Equal(QQN::Person()->Id, null);
     $idCol->FilterType = QFilterType::TextFilter;
     $idCol->FilterBoxSize = 3;
     //note that due to the CSS applied to the examples, this doesn't do anything
     $this->dtgPersons->AddColumn($idCol);
     $fNameCol = new QDataGridColumn('First Name', '<?= $_ITEM->FirstName ?>', 'Width=200', array('OrderByClause' => QQ::OrderBy(QQN::Person()->FirstName), 'ReverseOrderByClause' => QQ::OrderBy(QQN::Person()->FirstName, false)));
     $fNameCol->Filter = QQ::Like(QQN::Person()->FirstName, null);
     $fNameCol->FilterPrefix = $fNameCol->FilterPostfix = '%';
     $fNameCol->FilterType = QFilterType::TextFilter;
     $this->dtgPersons->AddColumn($fNameCol);
     $lNameCol = new QDataGridColumn('Last Name', '<?= $_ITEM->LastName ?>', 'Width=200', array('OrderByClause' => QQ::OrderBy(QQN::Person()->LastName), 'ReverseOrderByClause' => QQ::OrderBy(QQN::Person()->LastName, false)));
     QQN::Person()->LastName->SetFilteredDataGridColumnFilter($lNameCol);
     $this->dtgPersons->AddColumn($lNameCol);
     // Let's default the sorting to the last name column (column #2)
     $this->dtgPersons->SortColumnIndex = 2;
     // Specify the Datagrid's Data Binder method
     $this->dtgPersons->SetDataBinder('dtgPersons_Bind');
     // Make the DataGrid look nice
     $objStyle = $this->dtgPersons->RowStyle;
     $objStyle->FontSize = 12;
     $objStyle = $this->dtgPersons->AlternateRowStyle;
     $objStyle->BackColor = '#f6f6f6';
     $objStyle = $this->dtgPersons->HeaderRowStyle;
     $objStyle->ForeColor = 'white';
     $objStyle->BackColor = '#780000';
     // Because browsers will apply different styles/colors for LINKs
     // We must explicitly define the ForeColor for the HeaderLink.
     // The header row turns into links when the column can be sorted.
     $objStyle = $this->dtgPersons->HeaderLinkStyle;
     $objStyle->ForeColor = 'white';
 }
开发者ID:hiptc,项目名称:dle2wordpress,代码行数:47,代码来源:filtering.php

示例9: getList

 protected function getList($strTerm = null, $blnHtml = false)
 {
     if ($strTerm) {
         $cond = QQ::OrCondition(QQ::Like(QQN::Person()->FirstName, '%' . $strTerm . '%'), QQ::Like(QQN::Person()->LastName, '%' . $strTerm . '%'));
     } else {
         $cond = QQ::All();
     }
     $clauses[] = QQ::OrderBy(QQN::Person()->LastName, QQN::Person()->FirstName);
     $lst = Person::QueryArray($cond, $clauses);
     $a = array();
     foreach ($lst as $objPerson) {
         $item = new QListItem($objPerson->FirstName . ' ' . $objPerson->LastName, $objPerson->Id);
         if ($blnHtml) {
             $item->Label = '<em>' . $objPerson->FirstName . ' ' . $objPerson->LastName . '</em>';
         }
         $a[] = $item;
     }
     return $a;
 }
开发者ID:qcubed,项目名称:plugin_autocomplete2,代码行数:19,代码来源:autocomplete2.php

示例10: GetShareDetails

 protected function GetShareDetails()
 {
     $objClauses = array();
     array_push($objClauses, QQ::OrderBy(QQN::Sharedetails()->ReturnDate));
     if ($objClause = $this->dtrShareDetails->LimitClause) {
         array_push($objClauses, $this->dtrShareDetails->LimitClause);
     }
     if ($this->txtSearchTerm->Text == "") {
         $objCondition = QQ::Equal(QQN::Sharedetails()->Owner, $_SESSION['User']);
         $myassets = Sharedetails::QueryArray($objCondition, $objClauses);
     } else {
         $objCondition = QQ::AndCondition(QQ::OrCondition(QQ::Like(QQN::Sharedetails()->Asin, '%' . $this->txtSearchTerm->Text . '%'), QQ::Like(QQN::Sharedetails()->Email, '%' . $this->txtSearchTerm->Text . '%'), QQ::Like(QQN::Sharedetails()->TakenDate, '%' . $this->txtSearchTerm->Text . '%'), QQ::Like(QQN::Sharedetails()->ReturnDate, '%' . $this->txtSearchTerm->Text . '%'), QQ::Like(QQN::Sharedetails()->Title, '%' . $this->txtSearchTerm->Text . '%'), QQ::Like(QQN::Sharedetails()->FullName, '%' . $this->txtSearchTerm->Text . '%')), QQ::Equal(QQN::Myassets()->Owner, $_SESSION['User']));
         $objDbResult = Sharedetails::QueryArray($objCondition, $objClauses);
         $myassets = $objDbResult;
     }
     //$this->dtrShareDetails->TotalItemCount = Sharedetails::QueryCount($condition);
     $this->arrShareDetails = $myassets;
     return $objCondition;
 }
开发者ID:sarapsg,项目名称:prayuj,代码行数:19,代码来源:postlogin.php

示例11: 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

示例12: dtgPosts_Bind

 public function dtgPosts_Bind()
 {
     $objCondition = QQ::All();
     if ($intId = $this->lstCategory->SelectedValue) {
         $objCondition = QQ::AndCondition($objCondition, QQ::Equal(QQN::ClassifiedPost()->ClassifiedCategoryId, $intId));
     }
     if (!is_null($blnValue = $this->lstApproval->SelectedValue)) {
         $objCondition = QQ::AndCondition($objCondition, QQ::Equal(QQN::ClassifiedPost()->ApprovalFlag, $blnValue));
     }
     if (!is_null($blnValue = $this->lstExpiration->SelectedValue)) {
         $objCondition = QQ::AndCondition($objCondition, $blnValue ? QQ::LessThan(QQN::ClassifiedPost()->DateExpired, QDateTime::Now()) : QQ::GreaterOrEqual(QQN::ClassifiedPost()->DateExpired, QDateTime::Now()));
     }
     if (strlen($strText = trim($this->txtTitle->Text))) {
         $objCondition = QQ::AndCondition($objCondition, QQ::Like(QQN::ClassifiedPost()->Title, '%' . $strText . '%'));
     }
     if (strlen($strText = trim($this->txtName->Text))) {
         $objCondition = QQ::AndCondition($objCondition, QQ::Like(QQN::ClassifiedPost()->Name, '%' . $strText . '%'));
     }
     $this->dtgPosts->MetaDataBinder($objCondition);
 }
开发者ID:alcf,项目名称:chms,代码行数:20,代码来源:index.php

示例13: foreach

	<h2>Select all People where: the first name is alphabetically "greater than" the last name</h2>
	<ul>
<?php 
$objPersonArray = Person::QueryArray(QQ::GreaterThan(QQN::Person()->FirstName, QQN::Person()->LastName));
foreach ($objPersonArray as $objPerson) {
    _p('<li>' . $objPerson->FirstName . ' ' . $objPerson->LastName . '</li>', false);
}
?>
	</ul>
	<h2>Select all Projects where: the manager's first name is alphabetically "greater than" the last name, or who's name contains "Website"</h2>
	<ul>
<?php 
$objProjectArray = Project::QueryArray(QQ::OrCondition(QQ::GreaterThan(QQN::Project()->ManagerPerson->FirstName, QQN::Project()->ManagerPerson->LastName), QQ::Like(QQN::Project()->Name, '%Website%')));
foreach ($objProjectArray as $objProject) {
    _p(sprintf('<li>%s (managed by %s %s)</li>', $objProject->Name, $objProject->ManagerPerson->FirstName, $objProject->ManagerPerson->LastName), false);
}
?>
	</ul>
	<h2>Select all Projects where: the Project ID <= 2 AND (the manager's first name is alphabetically "greater than" the last name, or who's name contains "Website")</h2>
	<ul>
<?php 
$objProjectArray = Project::QueryArray(QQ::AndCondition(QQ::OrCondition(QQ::GreaterThan(QQN::Project()->ManagerPerson->FirstName, QQN::Project()->ManagerPerson->LastName), QQ::Like(QQN::Project()->Name, '%Website%')), QQ::LessOrEqual(QQN::Project()->Id, 2)));
foreach ($objProjectArray as $objProject) {
    _p(sprintf('<li>%s (managed by %s %s)</li>', $objProject->Name, $objProject->ManagerPerson->FirstName, $objProject->ManagerPerson->LastName), false);
}
?>
	</ul>
</div>

<?php 
require '../includes/footer.inc.php';
开发者ID:tomVertuoz,项目名称:framework,代码行数:31,代码来源:qqcondition.php

示例14: die

<?php

require_once 'prepend.inc.php';
if (!array_key_exists('q', $_GET)) {
    die("");
}
$strQuery = $_GET['q'] . '%';
$arrAppTemplateTags = AppTemplateTag::QueryArray(QQ::AndCondition(QQ::Like(QQN::AppTemplateTag()->Tag, $strQuery), QQ::Equal(QQN::AppTemplateTag()->Hidden, 0), QQ::Equal(QQN::AppTemplateTag()->Reserved, 0)));
//Render
foreach ($arrAppTemplateTags as $intIndex => $objAppTemplateTag) {
    echo $objAppTemplateTag->Tag . "\n";
}
开发者ID:schematical,项目名称:MJax2.0,代码行数:12,代码来源:appTemplateTag.autoComplete.php

示例15: dtgPeople_Bind

 public function dtgPeople_Bind()
 {
     $objConditions = QQ::All();
     $objClauses = array();
     $blnSearch = false;
     if ($strName = trim($this->txtName->Text)) {
         $blnSearch = true;
         Person::PrepareQqForSearch($strName, $objConditions, $objClauses);
     }
     if ($strName = trim($this->txtFirstName->Text)) {
         $blnSearch = true;
         $objConditions = QQ::AndCondition($objConditions, QQ::Like(QQN::Person()->FirstName, $strName . '%'));
     }
     if ($strName = trim($this->txtLastName->Text)) {
         $blnSearch = true;
         $objConditions = QQ::AndCondition($objConditions, QQ::Like(QQN::Person()->LastName, $strName . '%'));
     }
     if ($strName = trim($this->txtCity->Text)) {
         $blnSearch = true;
         $objConditions = QQ::AndCondition($objConditions, QQ::Like(QQN::Person()->PrimaryCityText, $strName . '%'));
     }
     if ($strName = trim($this->txtAddress->Text)) {
         $blnSearch = true;
         $objConditions = QQ::AndCondition($objConditions, QQ::Like(QQN::Person()->PrimaryAddressText, $strName . '%'));
     }
     if ($strName = trim($this->txtPhone->Text)) {
         $blnSearch = true;
         $objConditions = QQ::AndCondition($objConditions, QQ::Like(QQN::Person()->PrimaryPhoneText, $strName . '%'));
     }
     // No Search Parameters -- Let's see if we should find the check account folks first
     if (!$blnSearch) {
         if ($this->objParentControl->mctContribution->StewardshipContribution->PossiblePeopleArray) {
             $objConditions = QQ::Equal(QQN::Person()->CheckingAccountLookup->CheckingAccountLookupId, $this->objParentControl->mctContribution->StewardshipContribution->CheckingAccountLookupId);
         } else {
             $objConditions = QQ::None();
         }
     } else {
         $this->dtgPeople->NoDataHtml = 'No results found.  Please re-specify a search criteria above.';
     }
     $this->dtgPeople->MetaDataBinder($objConditions, $objClauses);
     // Automagically "Select" the First Person if applicable
     if (!$this->blnExplicitSelectionFlag && $this->dtgPeople->DataSource && count($this->dtgPeople->DataSource) > 0) {
         $this->pxySelectPerson_Click(null, null, $this->dtgPeople->DataSource[0]->Id);
     }
     $this->blnExplicitSelectionFlag = false;
 }
开发者ID:alcf,项目名称:chms,代码行数:46,代码来源:StewardshipSelectPersonDialogBox.class.php


注:本文中的QQ::Like方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。