Name

loadattrvalues — load attribute values from the database

Synopsis

use Wacs;
scalar loadattrvalues(...); 
 

Parameters

parameterdescription
type

specifies the context of the attribute values to be returned - the common two are sets or models although a number of others for general searching (setsearch and modsearch) and detailed searching (setdetail and moddetail) are also supported. Fields within the attributes schema specify which attributes should be included within results for each of these requests.

dbhandleThe handle to the active database connection to be used for the queries needed.

Summary

The loadattrvalues returns an hash (or array with alphanumeric keys) containing attribute keywords and their corresponding icons. This replaces the older static list of attributes with a dynamic and configurable mechanism drived from the database itself. Normally the keys themselves are keywords and the values are the corresponding icon name.

Availability

loadattrvalues is available in both perl and php and was introduced in Wacs 0.9.0 - it was not present prior to that release.