本文整理汇总了PHP中Company::InstantiateDbResult方法的典型用法代码示例。如果您正苦于以下问题:PHP Company::InstantiateDbResult方法的具体用法?PHP Company::InstantiateDbResult怎么用?PHP Company::InstantiateDbResult使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Company
的用法示例。
在下文中一共展示了Company::InstantiateDbResult方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: GetJournalForId
/**
* Gets the historical journal for an object from the log database.
* Objects will have VirtualAttributes available to lookup login, date, and action information from the journal object.
* @param integer intCompanyId
* @return Company[]
*/
public static function GetJournalForId($intCompanyId)
{
$objDatabase = Company::GetDatabase()->JournalingDatabase;
$objResult = $objDatabase->Query('SELECT * FROM company WHERE company_id = ' . $objDatabase->SqlVariable($intCompanyId) . ' ORDER BY __sys_date');
return Company::InstantiateDbResult($objResult);
}
示例2: QueryArray
/**
* Static Qcodo Query method to query for an array of Company objects.
* Uses BuildQueryStatment to perform most of the work.
* @param QQCondition $objConditions any conditions on the query, itself
* @param QQClause[] $objOptionalClausees additional optional QQClause objects for this query
* @param mixed[] $mixParameterArray a array of name-value pairs to perform PrepareStatement with
* @return Company[] the queried objects as an array
*/
public static function QueryArray(QQCondition $objConditions, $objOptionalClauses = null, $mixParameterArray = null)
{
// Get the Query Statement
try {
$strQuery = Company::BuildQueryStatement($objQueryBuilder, $objConditions, $objOptionalClauses, $mixParameterArray, false);
} catch (QCallerException $objExc) {
$objExc->IncrementOffset();
throw $objExc;
}
// Perform the Query and Instantiate the Array Result
$objDbResult = $objQueryBuilder->Database->Query($strQuery);
return Company::InstantiateDbResult($objDbResult, $objQueryBuilder->ExpandAsArrayNodes);
}
示例3:
$objArray = Asset::InstantiateDbResult($objDbResult);
break;
case 2:
$objArray = InventoryModel::InstantiateDbResult($objDbResult);
break;
case 4:
$objArray = AssetModel::InstantiateDbResult($objDbResult);
break;
case 5:
$objArray = Manufacturer::InstantiateDbResult($objDbResult);
break;
case 6:
$objArray = Category::InstantiateDbResult($objDbResult);
break;
case 7:
$objArray = Company::InstantiateDbResult($objDbResult);
break;
case 8:
$objArray = Contact::InstantiateDbResult($objDbResult);
break;
case 9:
$objArray = Address::InstantiateDbResult($objDbResult);
break;
case 10:
$objArray = Shipment::InstantiateDbResult($objDbResult);
break;
case 11:
$objArray = Receipt::InstantiateDbResult($objDbResult);
break;
}
if ($objArray) {
示例4: LoadArrayBySearch
/**
* Load an array of Company objects
* by ShortDescription, City, StateProvince, or Country
*
* @param string $strShortDescription
* @param string $strCity
* @param integer $intStateProvinceId
* @param integer $intCountryId
* @param string $strDateModified
* @param string $strDateModifiedFirst
* @param string $strDateModifiedLast
* @param string $strOrderBy
* @param string $strLimit
* @param array $objExpansionMap map of referenced columns to be immediately expanded via early-binding
* @return Company[]
*/
public static function LoadArrayBySearch($strShortDescription = null, $strCity = null, $intStateProvinceId = null, $intCountryId = null, $arrCustomFields = null, $strDateModified = null, $strDateModifiedFirst = null, $strDateModifiedLast = null, $blnAttachment = null, $strOrderBy = null, $strLimit = null, $objExpansionMap = null)
{
Company::ArrayQueryHelper($strOrderBy, $strLimit, $strLimitPrefix, $strLimitSuffix, $strExpandSelect, $strExpandFrom, $objExpansionMap, $objDatabase);
// Setup QueryExpansion
$objQueryExpansion = new QQueryExpansion();
if ($objExpansionMap) {
try {
Company::ExpandQuery('company', null, $objExpansionMap, $objQueryExpansion);
} catch (QCallerException $objExc) {
$objExc->IncrementOffset();
throw $objExc;
}
}
// Generate an array of SQL strings to be used in the search query
$arrSearchSql = Company::GenerateSearchSql($strShortDescription, $strCity, $intStateProvinceId, $intCountryId, $arrCustomFields, $strDateModified, $strDateModifiedFirst, $strDateModifiedLast, $blnAttachment);
$arrAttachmentSql = Attachment::GenerateSql(EntityQtype::Company);
$arrCustomFieldSql = CustomField::GenerateSql(EntityQtype::Company);
$strQuery = sprintf('
SELECT
%s
`company`.`company_id` AS `company_id`,
`company`.`address_id` AS `address_id`,
`company`.`short_description` AS `short_description`,
`company`.`website` AS `website`,
`company`.`telephone` AS `telephone`,
`company`.`fax` AS `fax`,
`company`.`email` AS `email`,
`company`.`long_description` AS `long_description`,
`company`.`created_by` AS `created_by`,
`company`.`creation_date` AS `creation_date`,
`company`.`modified_by` AS `modified_by`,
`company`.`modified_date` AS `modified_date`
%s
%s
%s
FROM
`company` AS `company`
%s
%s
%s
WHERE
1=1
%s
%s
%s
%s
%s
%s
%s
%s
%s
%s
%s
', $strLimitPrefix, $objQueryExpansion->GetSelectSql(",\n\t\t\t\t\t", ",\n\t\t\t\t\t"), $arrCustomFieldSql['strSelect'], $arrAttachmentSql['strSelect'], $objQueryExpansion->GetFromSql("", "\n\t\t\t\t\t"), $arrCustomFieldSql['strFrom'], $arrAttachmentSql['strFrom'], $arrSearchSql['strShortDescriptionSql'], $arrSearchSql['strCitySql'], $arrSearchSql['strStateProvinceSql'], $arrSearchSql['strCountrySql'], $arrSearchSql['strCustomFieldsSql'], $arrSearchSql['strDateModifiedSql'], $arrSearchSql['strAttachmentSql'], $arrSearchSql['strAuthorizationSql'], $arrAttachmentSql['strGroupBy'], $strOrderBy, $strLimitSuffix);
$objDbResult = $objDatabase->Query($strQuery);
return Company::InstantiateDbResult($objDbResult);
}