From Joomla! Documentation
Revision as of 16:41, 11 November 2008 by Batch1211
This article is tagged because it NEEDS REVIEW. You can help the Joomla! Documentation Wiki by contributing to it.
More pages that need help similar to this one are here. NOTE-If you feel the need is satistified, please remove this notice.
void load ($oid = NULL)
|$oid||integer||Optional primary key. If not specifed, the value of current key is used.||NULL|
JTable::load() - Loads a row from the database and binds the fields to the object properties.
Let's say we have a table, that stores greetings of different languages:
If we'd like to load the record with the id #3, we can do the following in a Controller or Model Class:
$table = $this->getTable('greeting'); $table->load(3); echo '<pre>'; print_r($table); echo '</pre>';