->get() -- Simple Get (Select) request
Beschrijving
Get a result using key, value. Returns Number of rows located (usually 1) for success,
and puts all the table columns into this classes variables.
If only one parameter is used, it is assumed that first parameter is a
value and get() will use the primary key.
Return waarde
int - Number of rows
Throws
Tabel 34-1. Mogelijke PEAR_Error waarden
Error code | Error message | Meaning | Solution |
---|
DB_DATAOBJECT_ERROR_INVALIDCONFIG | "No Keys available for $table" | | |
DB_DATAOBJECT_ERROR_INVALIDARGS | "No Value specified for get" | | |
Note
Deze functie kan niet statisch worden aangeroepen.
You should avoid calling get on the same object instance twice,
as this will result in unexpected results.
Voorbeeld
Voorbeeld 34-5. Results of example code Object (DataObjects_Person) =>
[N] => 1
[id] => 12
[group] => 5
[has_glasses] => 1
[name] => 'fred blogs'
[password] => '**testing'
[email] => 'test@example.com' |
|