API15

JTable/save

From Joomla! Documentation

< API15:JTable
Revision as of 13:52, 12 May 2013 by JoomlaWikiBot (talk | contribs) (removing red link to edit, no existant pages)

The "API15" namespace is an archived namespace. This page contains information for a Joomla! version which is no longer supported. It exists only as a historical reference, it will not be improved and its content may be incomplete and/or contain broken links.

Description[edit]

Generic save function

[<! removed edit link to red link >]

<! removed transcluded page call, red link never existed >

Syntax[edit]

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[edit]

TRUE if completely successful, FALSE if partially or not succesful.

Defined in[edit]

libraries/joomla/database/table.php

Importing[edit]

jimport( 'joomla.database.table' );

Source Body[edit]

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[edit]

<CodeExamplesForm />