API16

JTableUpdate/find: Difference between revisions

From Joomla! Documentation

Doxiki (talk | contribs)
New page: <span class="editsection" style="font-size:76%;"> <nowiki>[</nowiki>Edit Descripton<nowiki>]</nowiki> </span> {{Description:JTableUpdate/find}} ...
 
m clean up
Line 1: Line 1:
 
{{subst:Description:JTableUpdate/find}}
<span class="editsection" style="font-size:76%;">
<nowiki>[</nowiki>[[Description:JTableUpdate/find|Edit Descripton]]<nowiki>]</nowiki>
</span>
 
{{Description:JTableUpdate/find}}


===Syntax===
===Syntax===
Line 39: Line 34:
</source>
</source>


<span class="editsection" style="font-size:76%;">
 
<nowiki>[</nowiki>[[SeeAlso:JTableUpdate/find|Edit See Also]]<nowiki>]</nowiki>
{{subst:SeeAlso:JTableUpdate/find}}
</span>
{{SeeAlso:JTableUpdate/find}}


===Examples===
===Examples===

Revision as of 14:31, 24 March 2017

{{subst:Description:JTableUpdate/find}}

Syntax

find($options=Array())
Parameter Name Default Value Description
$options Array()

Defined in

libraries/joomla/database/table/update.php

Importing

jimport( 'joomla.database.table.update' );

Source Body

function find($options=Array()) {
        $dbo =& JFactory::getDBO();
        $where = Array();
        foreach($options as $col=>$val) {
                $where[] = $col .' = '. $dbo->Quote($val);
        }
        $query = 'SELECT update_id FROM #__updates WHERE '. implode(' AND ', $where);
        $dbo->setQuery($query);
        return $dbo->loadResult();
}


{{subst:SeeAlso:JTableUpdate/find}}

Examples

<CodeExamplesForm />