本文整理汇总了PHP中QQueryExpansion::GetSelectSql方法的典型用法代码示例。如果您正苦于以下问题:PHP QQueryExpansion::GetSelectSql方法的具体用法?PHP QQueryExpansion::GetSelectSql怎么用?PHP QQueryExpansion::GetSelectSql使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QQueryExpansion
的用法示例。
在下文中一共展示了QQueryExpansion::GetSelectSql方法的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;
}
}