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


PHP QQ::LessOrEqual方法代码示例

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


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

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

示例2: _

 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

示例3: exit

if ($intYear < 1950 || $intYear > 2500) {
    exit(0);
}
// Setup Zend Framework load
set_include_path(get_include_path() . ':' . __INCLUDES__);
require_once 'Zend/Loader.php';
Zend_Loader::loadClass('Zend_Pdf');
print "Generating Statistics PDF for " . $intYear . "\r\n";
// Delete Old Files
exec('rm -r -f ' . STATISTICS_PDF_PATH . '/StatisticsFor' . $intYear . '*.pdf');
// Create the PDF Object for the PDF
$objStatisticPdf = new Zend_Pdf();
$dtxAfterValue = new QDateTime("1/1/" . $intYear);
$dtxBeforeValue = new QDateTime("12/31/" . $intYear);
// Get the Data
$objContributionCursor = StewardshipContribution::QueryCursor(QQ::AndCondition(QQ::GreaterOrEqual(QQN::StewardshipContribution()->DateCredited, $dtxAfterValue), QQ::LessOrEqual(QQN::StewardshipContribution()->DateCredited, $dtxBeforeValue)));
// Setup the data holders
$fltTotalGifts = 0;
$fltTotalAdditionalUniqueGivers = 0;
$fltTotalGiftsOver1000 = 0;
$fltTotalGiftsOver10000 = 0;
$fltTotalAverageGiftSize = 0;
$fltTotalGiftAmount = 0;
$fltTotalGivers = 0;
$objDataGridArray = array();
$objMonthlyTotal = array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
$objMonthlyCount = array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
$objOver1000 = array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
$objOver10000 = array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
$objUniqueGiver = array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
$objGiverCount = array(array(), array(), array(), array(), array(), array(), array(), array(), array(), array(), array(), array());
开发者ID:alcf,项目名称:chms,代码行数:31,代码来源:generate-giving-statistics.cli.php

示例4: dtgPerson_Bind

 protected function dtgPerson_Bind()
 {
     $dtAfterValue = new QDateTime($this->dtxAfterValue->Text);
     $dtBeforeValue = new QDateTime($this->dtxBeforeValue->Text);
     $objConditions = QQ::All();
     $objConditions = QQ::AndCondition($objConditions, QQ::GreaterOrEqual(QQN::Person()->Comment->DatePosted, $dtAfterValue));
     $objConditions = QQ::AndCondition($objConditions, QQ::LessOrEqual(QQN::Person()->Comment->DatePosted, $dtBeforeValue));
     $objConditions = QQ::AndCondition($objConditions, QQ::Equal(QQN::Person()->Comment->CommentCategory->Name, "Pastoral"));
     $this->dtgPerson->TotalItemCount = count(Person::QueryArray($objConditions));
     $objPersonArray = Person::QueryArray($objConditions, $this->dtgPerson->LimitClause);
     $this->dtgPerson->DataSource = $objPersonArray;
 }
开发者ID:alcf,项目名称:chms,代码行数:12,代码来源:confidential_report.php

示例5: QCryptography

<?php

QCryptography::$Key = CRYPTO_KEY;
$objCrypto = new QCryptography(null, false);
// iterate through all recurring payments within the time period.
$objRecurringPaymentCursor = RecurringPayments::QueryCursor(QQ::AndCondition(QQ::LessOrEqual(QQN::RecurringPayments()->StartDate, date('Y-m-d')), QQ::GreaterOrEqual(QQN::RecurringPayments()->EndDate, date('Y-m-d'))));
while ($objRecurringPayment = RecurringPayments::InstantiateCursor($objRecurringPaymentCursor)) {
    // display information..
    print sprintf("Payment of: %s within time period: %s - %s\n", $objRecurringPayment->Amount, $objRecurringPayment->StartDate, $objRecurringPayment->EndDate);
    print sprintf("name : %s\nAddress: %s %s\n City: %s\nState: %s\nZip: %s\n", $objCrypto->Decrypt($objRecurringPayment->CardHolderName), $objCrypto->Decrypt($objRecurringPayment->Address1), $objCrypto->Decrypt($objRecurringPayment->Address2), $objCrypto->Decrypt($objRecurringPayment->City), $objRecurringPayment->State, $objCrypto->Decrypt($objRecurringPayment->Zip));
    print sprintf("Account Number: %s\nExpiration Date: %s\nSecurity code: %s\n", $objCrypto->Decrypt($objRecurringPayment->AccountNumber), $objRecurringPayment->ExpirationDate, $objCrypto->Decrypt($objRecurringPayment->SecurityCode));
    print sprintf("CreditCard Type: %d\n", $objRecurringPayment->CreditCardTypeId);
    // identify if any are due today
    $startDate = $objRecurringPayment->StartDate;
    $timePeriod = 0;
    switch ($objRecurringPayment->PaymentPeriod->Id) {
        case 1:
            // weekly
            $timePeriod = 7 * 24 * 60 * 60;
            break;
        case 2:
            // bi-weekly
            $timePeriod = 2 * 7 * 24 * 60 * 60;
            break;
        case 3:
            // monthly
            $timePeriod = 30 * 24 * 60 * 60;
            break;
        case 4:
            // quarterly
            $timePeriod = 4 * 30 * 24 * 60 * 60;
开发者ID:alcf,项目名称:chms,代码行数:31,代码来源:recurring-payments-check.cli.php

示例6: CalculateQuery

 protected function CalculateQuery(&$objCondition, &$objClauses, &$blnQueried)
 {
     $objCondition = QQ::All();
     $objClauses = array();
     $blnQueried = false;
     if ($strName = trim($this->txtName->Text)) {
         Person::PrepareQqForSearch($strName, $objCondition, $objClauses, QQN::StewardshipContribution()->Person);
         $blnQueried = true;
     }
     if ($intFundId = $this->lstFund->SelectedValue) {
         $blnQueried = true;
         $objCondition = QQ::AndCondition($objCondition, QQ::Equal(QQN::StewardshipContribution()->StewardshipContributionAmount->StewardshipFundId, $intFundId));
     }
     if (strlen($strText = trim($this->txtAmount->Text))) {
         $blnQueried = true;
         $objCondition = QQ::AndCondition($objCondition, QQ::Equal(QQN::StewardshipContribution()->TotalAmount, $strText));
     }
     if (strlen($strText = trim($this->txtCheckNumber->Text))) {
         $blnQueried = true;
         $objCondition = QQ::AndCondition($objCondition, QQ::Like(QQN::StewardshipContribution()->CheckNumber, '%' . $strText . '%'));
     }
     if (strlen($strText = trim($this->txtAuthorizationNumber->Text))) {
         $blnQueried = true;
         $objCondition = QQ::AndCondition($objCondition, QQ::Like(QQN::StewardshipContribution()->AuthorizationNumber, '%' . $strText . '%'));
     }
     $dttStart = $this->txtDateCreditedStart->DateTime;
     $dttEnd = $this->txtDateCreditedEnd->DateTime;
     if ($dttStart || $dttEnd) {
         $blnQueried = true;
         if ($dttStart && $dttEnd) {
             $objCondition = QQ::AndCondition($objCondition, QQ::GreaterOrEqual(QQN::StewardshipContribution()->DateCredited, $dttStart), QQ::LessOrEqual(QQN::StewardshipContribution()->DateCredited, $dttEnd));
         } else {
             if ($dttStart) {
                 $objCondition = QQ::AndCondition($objCondition, QQ::Equal(QQN::StewardshipContribution()->DateCredited, $dttStart));
             } else {
                 $objCondition = QQ::AndCondition($objCondition, QQ::LessOrEqual(QQN::StewardshipContribution()->DateCredited, $dttEnd));
             }
         }
     }
     $dttStart = $this->txtDateEnteredStart->DateTime;
     $dttEnd = $this->txtDateEnteredEnd->DateTime;
     if ($dttStart || $dttEnd) {
         $blnQueried = true;
         if ($dttStart && $dttEnd) {
             $objCondition = QQ::AndCondition($objCondition, QQ::GreaterOrEqual(QQN::StewardshipContribution()->StewardshipBatch->DateEntered, $dttStart), QQ::LessOrEqual(QQN::StewardshipContribution()->StewardshipBatch->DateEntered, $dttEnd));
         } else {
             if ($dttStart) {
                 $objCondition = QQ::AndCondition($objCondition, QQ::Equal(QQN::StewardshipContribution()->StewardshipBatch->DateEntered, $dttStart));
             } else {
                 $objCondition = QQ::AndCondition($objCondition, QQ::LessOrEqual(QQN::StewardshipContribution()->StewardshipBatch->DateEntered, $dttEnd));
             }
         }
     }
 }
开发者ID:alcf,项目名称:chms,代码行数:54,代码来源:index.php

示例7: LoadArrayByDateRange

 public static function LoadArrayByDateRange($dttAfter, $dttBefore, $objOptionalClauses = null)
 {
     // This will return an array of StewardshipContribution objects
     return StewardshipContribution::QueryArray(QQ::AndCondition(QQ::GreaterOrEqual(QQN::StewardshipContribution()->DateCredited, $dttAfter), QQ::LessOrEqual(QQN::StewardshipContribution()->DateCredited, $dttBefore)), $objOptionalClauses);
 }
开发者ID:alcf,项目名称:chms,代码行数:5,代码来源:StewardshipContribution.class.php

示例8: dtgStewardshipContributionAmount_Bind

 public function dtgStewardshipContributionAmount_Bind()
 {
     $this->fltTotal = 0;
     if ($this->chkCombined && $this->chkCombined->Checked) {
         $intPersonIdArray = array();
         foreach ($this->objForm->objHousehold->GetHouseholdParticipationArray() as $objParticipation) {
             $intPersonIdArray[] = $objParticipation->PersonId;
         }
         $objCondition = QQ::In(QQN::StewardshipContributionAmount()->StewardshipContribution->PersonId, $intPersonIdArray);
     } else {
         $objCondition = QQ::Equal(QQN::StewardshipContributionAmount()->StewardshipContribution->PersonId, $this->objPerson->Id);
     }
     if ($this->lstYear->SelectedValue) {
         $objCondition = QQ::AndCondition($objCondition, QQ::GreaterOrEqual(QQN::StewardshipContributionAmount()->StewardshipContribution->DateCredited, new QDateTime($this->lstYear->SelectedValue . '-01-01 00:00:00')), QQ::LessOrEqual(QQN::StewardshipContributionAmount()->StewardshipContribution->DateCredited, new QDateTime($this->lstYear->SelectedValue . '-12-31 23:59:59')));
     }
     if ($this->lstFund->SelectedValue) {
         $objCondition = QQ::AndCondition($objCondition, QQ::Equal(QQN::StewardshipContributionAmount()->StewardshipFundId, $this->lstFund->SelectedValue));
     }
     $this->dtgStewardshipContributionAmount->MetaDataBinder($objCondition);
     // Add 'Totals' Row
     $objDataSource = $this->dtgStewardshipContributionAmount->DataSource;
     $objDataSource[] = new StewardshipContributionAmount();
     $this->dtgStewardshipContributionAmount->DataSource = $objDataSource;
 }
开发者ID:alcf,项目名称:chms,代码行数:24,代码来源:Vicp_Stewardship.class.php

示例9: LoadArrayByEndDateRange

 public static function LoadArrayByEndDateRange($dttAfterDateStart, $dttBeforeDateStart, $objCondition = null, $objOptionalClauses = null)
 {
     // This will return an array of Membership objects
     $objCondition = QQ::AndCondition($objCondition, QQ::AndCondition(QQ::GreaterOrEqual(QQN::Membership()->DateEnd, $dttAfterDateStart), QQ::LessOrEqual(QQN::Membership()->DateEnd, $dttBeforeDateStart)));
     return Membership::QueryArray($objCondition, $objOptionalClauses);
 }
开发者ID:alcf,项目名称:chms,代码行数:6,代码来源:Membership.class.php


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