The static method is similar to the get request, however it does not require the initial instantiation of the class. staticGet will also auto load the class. staticGet() can also cache the results, (see configuration)
string $class - class name
string $key - column (or value if only 2 paramaters are given)
mixed $value - value
Table 26-1. Possible PEAR_Error values
Error code | Error message | Meaning | Solution |
---|---|---|---|
DB_DATAOBJECT_ERROR_NOCLASS | "could not autoload $class" | ||
DB_DATAOBJECT_ERROR_NOCLASS | "Error creating $newclass" | ||
DB_DATAOBJECT_ERROR_NODATA | "No Data return from get $key $value" |
Example 26-1. Simple fetch of data based on Primary Key
|