|
|
Home Developer Manual 11. API Reference [WORKING] mosDBTable->get |
| [WORKING] mosDBTable->get |
|
|
|
|
Last reviewed: Not reviewed mosDBTable->getReturns the value of an object property. This method should be used in preference to directly referring to an objects' properties. Returns null if the object has no property of the name given. See also mosDBTable->set. Syntaxmixed get ( string $property )
ExamplesExample: This example retrieves some fields from a Joomla! user record. global $database; // Declare an instance of the mosUser class. $user = new mosUser( $database ); // Load user record with primary key id 62; $uid = 62; if (!$user->load( $uid )) { echo "Cannot load user id $uid: " . $database->stderr(); } // Show some of the fields retrieved. echo 'Name: ' . $user->get( 'name' ) . "\n"; echo 'Username: ' . $user->get( 'username' ) . "\n"; echo 'Usertype: ' . $user->get( 'usertype' ) . "\n"; which might output: Name: Joe Bloggs Username: jbloggs Usertype: Registered Please report any errors on this page to the Developer Documentation Forum. |
|
| Last Updated ( Sunday, 24 December 2006 ) |
| < Prev | Next > |
|---|





