API15:JElementSQL/fetchElement
From Joomla! Documentation
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.
Description:JElementSQL/fetchElement
Contents |
Syntax
fetchElement($name, $value, &$node, $control_name)
| Parameter Name | Default Value | Description |
|---|---|---|
| $name | ||
| $value | ||
| &$node | ||
| $control_name |
Defined in
libraries/joomla/html/parameter/element/sql.php
Importing
jimport( 'joomla.html.parameter.element.sql' );
Source Body
function fetchElement($name, $value, &$node, $control_name) { $db = & JFactory::getDBO(); $db->setQuery($node->attributes('query')); $key = ($node->attributes('key_field') ? $node->attributes('key_field') : 'value'); $val = ($node->attributes('value_field') ? $node->attributes('value_field') : $name); return JHTML::_('select.genericlist', $db->loadObjectList(), ''.$control_name.'['.$name.']', 'class="inputbox"', $key, $val, $value, $control_name.$name); }
[Edit See Also] SeeAlso:JElementSQL/fetchElement
Examples
<CodeExamplesForm />
