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


PHP QQueryExpansion::GetFromSql方法代码示例

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


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

示例1: ArrayQueryHelper

 /**
  * Internally called method to assist with SQL Query options/preferences for array loaders.
  * Any LoadAll or LoadArray method can use this method to setup SQL Query Clauses that deal
  * with OrderBy, Limit, and Object Expansion.  Strings that contain SQL Query Clauses are
  * passed in by reference.
  * @param string $strOrderBy reference to the Order By as passed in to the LoadArray method
  * @param string $strLimit the Limit as passed in to the LoadArray method
  * @param string $strLimitPrefix reference to the Limit Prefix to be used in the SQL
  * @param string $strLimitSuffix reference to the Limit Suffix to be used in the SQL
  * @param string $strExpandSelect reference to the Expand Select to be used in the SQL
  * @param string $strExpandFrom reference to the Expand From to be used in the SQL
  * @param array $objExpansionMap map of referenced columns to be immediately expanded via early-binding
  * @param string $objDatabase reference to the Database object to be queried
  */
 protected static function ArrayQueryHelper(&$strOrderBy, $strLimit, &$strLimitPrefix, &$strLimitSuffix, &$strExpandSelect, &$strExpandFrom, $objExpansionMap, &$objDatabase)
 {
     // Get the Database
     $objDatabase = QApplication::$Database[1];
     // Setup OrderBy and Limit Information (if applicable)
     $strOrderBy = $objDatabase->SqlSortByVariable($strOrderBy);
     $strLimitPrefix = $objDatabase->SqlLimitVariablePrefix($strLimit);
     $strLimitSuffix = $objDatabase->SqlLimitVariableSuffix($strLimit);
     // Setup QueryExpansion (if applicable)
     if ($objExpansionMap) {
         $objQueryExpansion = new QQueryExpansion('AssetCustomFieldHelper', 'asset_custom_field_helper', $objExpansionMap);
         $strExpandSelect = $objQueryExpansion->GetSelectSql();
         $strExpandFrom = $objQueryExpansion->GetFromSql();
     } else {
         $strExpandSelect = null;
         $strExpandFrom = null;
     }
 }
开发者ID:proxymoron,项目名称:tracmor,代码行数:32,代码来源:AssetCustomFieldHelperGen.class.php


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