本文整理汇总了PHP中AttributeValue::LoadArrayByAttributeId方法的典型用法代码示例。如果您正苦于以下问题:PHP AttributeValue::LoadArrayByAttributeId方法的具体用法?PHP AttributeValue::LoadArrayByAttributeId怎么用?PHP AttributeValue::LoadArrayByAttributeId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AttributeValue
的用法示例。
在下文中一共展示了AttributeValue::LoadArrayByAttributeId方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
<?php
$intPersonIdByIndvId = array();
foreach (AttributeValue::LoadArrayByAttributeId(2) as $objAttributeValue) {
$intPersonIdByIndvId[$objAttributeValue->TextValue] = $objAttributeValue->PersonId;
}
$objMySqli = new mysqli('localhost', 'root', '', 'alcf_acs');
$objResult = $objMySqli->query('SELECT * FROM awperelt');
$intCount = $objResult->num_rows;
while (QDataGen::DisplayWhileTask('Importing Family Relationships', $intCount) && ($objRow = $objResult->fetch_array())) {
if ($objRow['indvid'] != $objRow['reltindvid']) {
$intRelationshipTypeId = null;
switch (strtolower($objRow['relationship'])) {
case 'mother':
case 'father':
$intRelationshipTypeId = RelationshipType::Parental;
break;
case 'son':
case 'daughter':
$intRelationshipTypeId = RelationshipType::Child;
break;
case 'brother':
case 'sister':
$intRelationshipTypeId = RelationshipType::Sibling;
break;
case 'grandmother':
case 'grandfather':
$intRelationshipTypeId = RelationshipType::Grandparent;
break;
case 'grandchild':
case 'grandson':
示例2: DeleteAllAttributeValues
/**
* Deletes all associated AttributeValues
* @return void
*/
public function DeleteAllAttributeValues()
{
if (is_null($this->intId)) {
throw new QUndefinedPrimaryKeyException('Unable to call UnassociateAttributeValue on this unsaved Attribute.');
}
// Get the Database Object for this Class
$objDatabase = Attribute::GetDatabase();
// Journaling
if ($objDatabase->JournalingDatabase) {
foreach (AttributeValue::LoadArrayByAttributeId($this->intId) as $objAttributeValue) {
$objAttributeValue->Journal('DELETE');
}
}
// Perform the SQL Query
$objDatabase->NonQuery('
DELETE FROM
`attribute_value`
WHERE
`attribute_id` = ' . $objDatabase->SqlVariable($this->intId) . '
');
}