|
|
Home Manual 11. API Reference [WORKING] mosDBTable->load |
| [WORKING] mosDBTable->load |
|
|
|
|
Last reviewed: Not reviewed mosDBTable->loadGeneric load object from database table row. Loads the properties of the mosDBTable object with the fields of the same name from the database table row specified. Syntaxboolean load ( [ int $id ] )
ExamplesExample: global $database; // Declare an instance of the user class. $user = new mosUser( $database ); // Load the record with id 62. $uid = 62; if (!$user->load( $uid )) { echo "Error: Cannot load user with id $uid\n"; } else { echo "Name: " . $user->get( 'name' ) . "\n"; echo "Username: " . $user->get( 'username' ) . "\n"; echo "Usertype: " . $user->get( 'usertype' ) . "\n"; } Please report any errors on this page to the Developer Documentation Forum. |
|
| Last Updated ( Monday, 25 December 2006 ) |
| < Prev | Next > |
|---|





