JTableUpdate/find: Difference between revisions
From Joomla! Documentation
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}} | |||
{{Description:JTableUpdate/find}} | |||
===Syntax=== | ===Syntax=== | ||
| Line 39: | Line 34: | ||
</source> | </source> | ||
{{subst:SeeAlso:JTableUpdate/find}} | |||
{{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 />