Difference between revisions of "JTable/checkin"
From Joomla! Documentation
< API15:JTable
(New page: ===Description===
Checks in a row
<span class="editsection" style="font-size:76%;">
<nowiki>[</nowiki>Edit Descripton<nowiki>]</nowiki>
</span>
{{De...) |
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>[<! removed edit link to red link >]</nowiki> |
</span> | </span> | ||
− | + | <! removed transcluded page call, red link never existed > | |
===Syntax=== | ===Syntax=== | ||
Line 64: | Line 64: | ||
<span class="editsection" style="font-size:76%;"> | <span class="editsection" style="font-size:76%;"> | ||
− | <nowiki>[< | + | <nowiki>[<! removed edit link to red link >]</nowiki> |
</span> | </span> | ||
− | + | <! removed transcluded page call, red link never existed > | |
===Examples=== | ===Examples=== | ||
Line 79: | Line 79: | ||
format= ,,, | format= ,,, | ||
</dpl> | </dpl> | ||
+ | [[Category:Archived pages API15]] |
Revision as of 13:51, 12 May 2013
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]
Checks in a row
[<! removed edit link to red link >]
<! removed transcluded page call, red link never existed >
Syntax[edit]
checkin($oid=null)
Parameter Name | Default Value | Description |
---|---|---|
$oid | null | The primary key value for the row |
Returns[edit]
boolean True if successful, or if checkout is not supported
Defined in[edit]
libraries/joomla/database/table.php
Importing[edit]
jimport( 'joomla.database.table' );
Source Body[edit]
function checkin( $oid=null )
{
if (!(
in_array( 'checked_out', array_keys($this->getProperties()) ) ||
in_array( 'checked_out_time', array_keys($this->getProperties()) )
)) {
return true;
}
$k = $this->_tbl_key;
if ($oid !== null) {
$this->$k = $oid;
}
if ($this->$k == NULL) {
return false;
}
$query = 'UPDATE '.$this->_db->nameQuote( $this->_tbl ).
' SET checked_out = 0, checked_out_time = '.$this->_db->Quote($this->_db->getNullDate()) .
' WHERE '.$this->_tbl_key.' = '. $this->_db->Quote($this->$k);
$this->_db->setQuery( $query );
$this->checked_out = 0;
$this->checked_out_time = '';
return $this->_db->query();
}
[<! removed edit link to red link >] <! removed transcluded page call, red link never existed >
Examples[edit]
<CodeExamplesForm />