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


PHP QQ::LessThan方法代码示例

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


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

示例1: dtgItems_Bind

 public function dtgItems_Bind()
 {
     $intYear = QApplication::PathInfo(0);
     $dttStart = new QDateTime($intYear . '-01-01');
     $dttEnd = new QDateTime($dttStart);
     $dttEnd->Year += 1;
     $dttStart->SetTime(null, null, null);
     $dttEnd->SetTime(null, null, null);
     $objPersonCursor = Person::QueryCursor(QQ::AndCondition(QQ::GreaterOrEqual(QQN::Person()->StewardshipContribution->DateCredited, $dttStart), QQ::LessThan(QQN::Person()->StewardshipContribution->DateCredited, $dttEnd)), QQ::Clause(QQ::Distinct(), QQ::OrderBy(QQN::Person()->LastName, QQN::Person()->FirstName)));
     $strNameArray = array();
     $strNameValueArray = array();
     while ($objPerson = Person::InstantiateCursor($objPersonCursor)) {
         $strToken = strtolower($objPerson->FirstName . '|' . $objPerson->LastName);
         $strToken = str_replace(' ', '', $strToken);
         $strToken = str_replace('.', '', $strToken);
         $strToken = str_replace(',', '', $strToken);
         $strToken = str_replace('-', '', $strToken);
         $strToken = str_replace('_', '', $strToken);
         $strToken = str_replace('/', '', $strToken);
         if (array_key_exists($strToken, $strNameArray)) {
             $strNameValueArray[$strToken] = $objPerson->FirstName . ' ' . $objPerson->LastName;
         }
         $strNameArray[$strToken] = true;
     }
     $this->dtgItems->DataSource = $strNameValueArray;
 }
开发者ID:alcf,项目名称:chms,代码行数:26,代码来源:duplicate_names.php

示例2: dtgItems_Bind

 public function dtgItems_Bind()
 {
     $intYear = QApplication::PathInfo(0);
     $dttStart = new QDateTime($intYear . '-01-01');
     $dttEnd = new QDateTime($dttStart);
     $dttEnd->Year += 1;
     $dttStart->SetTime(null, null, null);
     $dttEnd->SetTime(null, null, null);
     $this->dtgItems->DataSource = Person::QueryArray(QQ::AndCondition(QQ::GreaterOrEqual(QQN::Person()->StewardshipContribution->DateCredited, $dttStart), QQ::LessThan(QQN::Person()->StewardshipContribution->DateCredited, $dttEnd), QQ::IsNull(QQN::Person()->PrimaryAddressText), QQ::IsNull(QQN::Person()->StewardshipAddressId)), QQ::Clause(QQ::Distinct(), QQ::OrderBy(QQN::Person()->LastName, QQN::Person()->FirstName)));
 }
开发者ID:alcf,项目名称:chms,代码行数:10,代码来源:invalid_addresses.php

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

示例4: _

 public static function _(QQNode $objQueryNode, $strSymbol, $mixValue, $mixValueTwo = null)
 {
     try {
         switch (strtolower(trim($strSymbol))) {
             case '=':
                 return QQ::Equal($objQueryNode, $mixValue);
             case '!=':
                 return QQ::NotEqual($objQueryNode, $mixValue);
             case '>':
                 return QQ::GreaterThan($objQueryNode, $mixValue);
             case '<':
                 return QQ::LessThan($objQueryNode, $mixValue);
             case '>=':
                 return QQ::GreaterOrEqual($objQueryNode, $mixValue);
             case '<=':
                 return QQ::LessOrEqual($objQueryNode, $mixValue);
             case 'in':
                 return QQ::In($objQueryNode, $mixValue);
             case 'not in':
                 return QQ::NotIn($objQueryNode, $mixValue);
             case 'like':
                 return QQ::Like($objQueryNode, $mixValue);
             case 'not like':
                 return QQ::NotLike($objQueryNode, $mixValue);
             case 'is null':
                 return QQ::IsNull($objQueryNode, $mixValue);
             case 'is not null':
                 return QQ::IsNotNull($objQueryNode, $mixValue);
             case 'between':
                 return QQ::Between($objQueryNode, $mixValue, $mixValueTwo);
             case 'not between':
                 return QQ::NotBetween($objQueryNode, $mixValue, $mixValueTwo);
             default:
                 throw new QCallerException('Unknown Query Comparison Operation: ' . $strSymbol, 0);
         }
     } catch (QCallerException $objExc) {
         $objExc->IncrementOffset();
         throw $objExc;
     }
 }
开发者ID:qcodo,项目名称:qcodo,代码行数:40,代码来源:QQuery.class.php

示例5: dirname

 * This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public
 * License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any
 * later version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
 * more details.
 *
 * You should have received a copy of the GNU General Public License along with this program; if not, write to the
 * Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 */
require_once dirname(__FILE__) . '/configuration/prepend.inc.php';
if (isset($argv[0])) {
    $intCnt = 0;
    $intSkipped = 0;
    foreach (NarroSuggestion::QueryArray(QQ::AndCondition(QQ::NotEqual(QQN::NarroSuggestion()->UserId, 0), QQ::LessThan(QQN::NarroSuggestion()->SuggestionWordCount, 1)), array(QQ::OrderBy(QQN::NarroSuggestion()->SuggestionId, 0), QQ::LimitInfo(10000, 0))) as $intVal => $objSuggestion) {
        if ($objSuggestion->SuggestionValueMd5 != md5($objSuggestion->SuggestionValue)) {
            $intSkipped++;
            continue;
        }
        try {
            $objSuggestion->SaveWordCount();
            $intCnt++;
        } catch (Exception $objEx) {
            echo $objEx->getMessage();
        }
    }
    printf("Skipped %d, saved %d suggestions, last suggestion id is %d\n", $intSkipped, $intCnt, $objSuggestion->SuggestionId);
    die;
}
//    if (QApplication::HasPermission('Administrator')) {
开发者ID:Jobava,项目名称:narro,代码行数:31,代码来源:update_narro_from_0.9.4_to_1.0.0.php

示例6: foreach

	<h3>Custom Load Query: Select all Projects with Budgets over $5000, ordered by Descending Budget</h3>
<?php 
// Custom Load Queries must have a resultset that returns all the fields of the
// table which corresponds to the ORM class you want to instantiate
// Note that because the InstantiateDb* methods in your ORM classes are code generated
// it is actually safe to use "SELECT *" for your Custom Load Queries.
$strQuery = 'SELECT project.* FROM project WHERE budget > 5000 ORDER BY budget DESC';
// perform the query
$objDbResult = $objDatabase->Query($strQuery);
// Use the Project::InstantiateDbResult on the $objDbResult to get an array of Project objects
$objProjectArray = Project::InstantiateDbResult($objDbResult);
// Iterate through the Project Array as you would any other ORM object
foreach ($objProjectArray as $objProject) {
    _p($objProject->Name . ' has a budget of $' . $objProject->Budget);
    _p('<br/>', false);
}
?>



	<h3>Qcodo Query: Select all Projects which have a Budget over $5000 and under $10000, ordered by Descending Budget</h3>
<?php 
// Perform the Query using Project::QueryArray, which will return an array of Project objects
// given a QQ Condition, and any optional QQ Clauses.
$objProjectArray = Project::QueryArray(QQ::AndCondition(QQ::GreaterThan(QQN::Project()->Budget, 5000), QQ::LessThan(QQN::Project()->Budget, 10000)), QQ::Clause(QQ::OrderBy(QQN::Project()->Budget, false)));
// Iterate through the Project Array like last time
foreach ($objProjectArray as $objProject) {
    _p($objProject->Name . ' has a budget of $' . $objProject->Budget);
    _p('<br/>', false);
}
require '../includes/footer.inc.php';
开发者ID:kmcelhinney,项目名称:qcodo,代码行数:31,代码来源:intro.php

示例7: MoveStewardshipTransactions

 /**
  * This will move all the transactions for a given year to be credited to another person
  * @param integer $intYear
  * @param Person $objPerson
  */
 public function MoveStewardshipTransactions($intYear, Person $objPerson)
 {
     StewardshipContribution::GetDatabase()->TransactionBegin();
     $objArray = StewardshipContribution::QueryArray(QQ::AndCondition(QQ::Equal(QQN::StewardshipContribution()->PersonId, $this->intId), QQ::GreaterOrEqual(QQN::StewardshipContribution()->DateCredited, new QDateTime($intYear . '-01-01')), QQ::LessThan(QQN::StewardshipContribution()->DateCredited, new QDateTime($intYear + 1 . '-01-01'))));
     foreach ($objArray as $objContribution) {
         $objContribution->Person = $objPerson;
         $objContribution->Save();
         foreach ($objContribution->GetStewardshipPostLineItemArray() as $objLineItem) {
             $objLineItem->Person = $objPerson;
             $objLineItem->Save();
         }
     }
     StewardshipContribution::GetDatabase()->TransactionCommit();
 }
开发者ID:alcf,项目名称:chms,代码行数:19,代码来源:Person.class.php

示例8: testSelect

 public function testSelect()
 {
     $objTest = new TypeTest();
     $objTest->TestFloat = 1.0;
     $objTest->Save();
     $objTest2 = new TypeTest();
     $objTest2->TestFloat = 2.0;
     $objTest2->Save();
     $objResArray = TypeTest::QueryArray(QQ::LessThan(QQ::Virtual('mul1', QQ::Mul(QQN::TypeTest()->TestFloat, -2.0)), -1.0), QQ::Clause(QQ::OrderBy(QQ::Virtual('mul1')), QQ::Expand(QQ::Virtual('mul1')), QQ::Select(QQ::Virtual('mul1'))));
     $this->assertEquals(2, count($objResArray));
     if (2 == count($objResArray)) {
         $objRes = $objResArray[0];
         $this->assertNotNull($objRes);
         if ($objRes) {
             $this->assertNull($objRes->TestFloat);
             $this->assertEquals(-4.0, $objRes->GetVirtualAttribute('mul1'));
         }
         $objRes = $objResArray[1];
         $this->assertNotNull($objRes);
         if ($objRes) {
             $this->assertNull($objRes->TestFloat);
             $this->assertEquals(-2.0, $objRes->GetVirtualAttribute('mul1'));
         }
     }
     $objTest->Delete();
     $objTest2->Delete();
 }
开发者ID:vaibhav-kaushal,项目名称:qc-framework,代码行数:27,代码来源:QQMathOpTest.php


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