API15:JTable/save
From Joomla! Documentation
Description
Generic save function
[<! removed edit link to red link >]
<! removed transcluded page call, red link never existed >
Syntax
save($source, $order_filter='', $ignore='')
| Parameter Name | Default Value | Description |
|---|---|---|
| $source | Source array for binding to class vars | |
| $order_filter | Filter for the order updating | |
| $ignore | An array or space separated list of fields not to bind |
Returns
TRUE if completely successful, FALSE if partially or not succesful.
Defined in
libraries/joomla/database/table.php
Importing
jimport( 'joomla.database.table' );
Source Body
function save( $source, $order_filter='', $ignore='' )
{
if (!$this->bind( $source, $ignore )) {
return false;
}
if (!$this->check()) {
return false;
}
if (!$this->store()) {
return false;
}
if (!$this->checkin()) {
return false;
}
if ($order_filter)
{
$filter_value = $this->$order_filter;
$this->reorder( $order_filter ? $this->_db->nameQuote( $order_filter ).' = '.$this->_db->Quote( $filter_value ) : '' );
}
$this->setError('');
return true;
}
[<! removed edit link to red link >] <! removed transcluded page call, red link never existed >
Examples
Code Examples