JTableSession/insert: Difference between revisions
From Joomla! Documentation
New page:
<span class="editsection" style="font-size:76%;">
<nowiki>[</nowiki>Edit Descripton<nowiki>]</nowiki>
</span>
{{Description:JTableSession/inser... |
m preparing for archive only |
||
| (One intermediate revision by the same user not shown) | |||
| Line 1: | Line 1: | ||
===Syntax=== | ===Syntax=== | ||
<source lang="php">insert($sessionId, $clientId)</source> | <source lang="php">insert($sessionId, $clientId)</source> | ||
| Line 48: | Line 41: | ||
</source> | </source> | ||
===Examples=== | ===Examples=== | ||
=== Code Examples === | |||
<dpl> | <dpl> | ||
noresultsheader=\n | noresultsheader=\n | ||
category=insert | category=insert | ||
category=JTableSession | category=JTableSession | ||
namespace=CodeExample | |||
category=MethodExample | category=MethodExample | ||
include=* | include=* | ||
format= ,,, | format= ,,, | ||
</dpl> | </dpl> | ||
Latest revision as of 02:12, 25 March 2017
Syntax
insert($sessionId, $clientId)
| Parameter Name | Default Value | Description |
|---|---|---|
| $sessionId | ||
| $clientId |
Defined in
libraries/joomla/database/table/session.php
Importing
jimport( 'joomla.database.table.session' );
Source Body
function insert($sessionId, $clientId)
{
$this->session_id = $sessionId;
$this->client_id = $clientId;
$this->time = time();
$ret = $this->_db->insertObject($this->_tbl, $this, 'session_id');
if (!$ret) {
$this->setError(strtolower(get_class($this))."::". JText::_('STORE_FAILED') ."<br />" . $this->_db->stderr());
return false;
} else {
return true;
}
}
Examples
Code Examples