Difference between revisions of "Resource saveResourceProperties"
Line 1: | Line 1: | ||
[[Category:Resource_Functions]] | [[Category:Resource_Functions]] | ||
− | | + | {{HelpFiles}} |
====Resource_saveResourceProperties==== | ====Resource_saveResourceProperties==== |
Latest revision as of 03:58, 14 December 2011
Resource_saveResourceProperties
Save a resource's properties to the database
Syntax
Resource_saveResourceProperties(resourceId, properties)
Arguments
- resourceId: is a number expression. It is the resource's unique id
- properties: is an array, it is the property array which has the same format as what described in Resource_getResourceProperties function
Return value
empty
Example
array properties = Resource_getResourceProperties(15543655);
number i;
number n = arrayCount(properties);
for (i = 0; i <n; i = i + 1)
{
if (properties[i][RESOURCE_PROPERTY_TYPE] == RESOURCE_PROPERTY_TYPE_SINGLE)
//set the first option selected
properties[i][RESOURCE_PROPERTY_VALUE] = 1;
}
Resource_saveResourceProperties(15543655, properties);
Availability
Version 5.6