Actions

API15

Difference between revisions of "JTable/store"

From Joomla! Documentation

< API15:JTable
(New page: ===Description=== Inserts a new row if id is zero or updates an existing row in the database table <span class="editsection" style="font-size:76%;"> <nowiki>[</nowiki>[[Description:JT...)
 
m (removing red link to edit, no existant pages)
 
Line 3: Line 3:
  
 
<span class="editsection" style="font-size:76%;">
 
<span class="editsection" style="font-size:76%;">
<nowiki>[</nowiki>[[Description:JTable/store|Edit Descripton]]<nowiki>]</nowiki>
+
<nowiki>[<! removed edit link to red link >]</nowiki>
 
</span>
 
</span>
  
{{Description:JTable/store}}
+
<! removed transcluded page call, red link never existed >
  
 
===Syntax===
 
===Syntax===
Line 57: Line 57:
  
 
<span class="editsection" style="font-size:76%;">
 
<span class="editsection" style="font-size:76%;">
<nowiki>[</nowiki>[[SeeAlso:JTable/store|Edit See Also]]<nowiki>]</nowiki>
+
<nowiki>[<! removed edit link to red link >]</nowiki>
 
</span>
 
</span>
{{SeeAlso:JTable/store}}
+
<! removed transcluded page call, red link never existed >
  
 
===Examples===
 
===Examples===
Line 72: Line 72:
 
  format= ,,,
 
  format= ,,,
 
</dpl>
 
</dpl>
 +
[[Category:Archived pages API15]]

Latest revision as of 12:52, 12 May 2013

Replacement filing cabinet.png
This Namespace has been archived - Please Do Not Edit or Create Pages in this namespace. Pages contain information for a Joomla! version which is no longer supported. It exists only as a historical reference, will not be improved and its content may be incomplete.

Contents

Description

Inserts a new row if id is zero or updates an existing row in the database table

[<! removed edit link to red link >]

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

Syntax

store($updateNulls=false)
Parameter Name Default Value Description
$updateNulls false If false, null object variables are not updated

Returns

null|string null if successful otherwise returns and error message

Defined in

libraries/joomla/database/table.php

Importing

jimport( 'joomla.database.table' );

Source Body

function store( $updateNulls=false )
{
        $k = $this->_tbl_key;
 
        if( $this->$k)
        {
                $ret = $this->_db->updateObject( $this->_tbl, $this, $this->_tbl_key, $updateNulls );
        }
        else
        {
                $ret = $this->_db->insertObject( $this->_tbl, $this, $this->_tbl_key );
        }
        if( !$ret )
        {
                $this->setError(get_class( $this ).'::store failed - '.$this->_db->getErrorMsg());
                return false;
        }
        else
        {
                return true;
        }
}

[<! removed edit link to red link >] <! removed transcluded page call, red link never existed >

Examples

<CodeExamplesForm />