API15:JTableContent/toXML
From Joomla! Documentation
Description
Converts record to XML
[<! removed edit link to red link >]
<! removed transcluded page call, red link never existed >
Syntax
toXML($mapKeysToText=false)
| Parameter Name | Default Value | Description |
|---|---|---|
| $mapKeysToText | false | Map foreign keys to text values |
Defined in
libraries/joomla/database/table/content.php
Importing
jimport( 'joomla.database.table.content' );
Source Body
function toXML( $mapKeysToText=false )
{
$db =& JFactory::getDBO();
if ($mapKeysToText) {
$query = 'SELECT name'
. ' FROM #__sections'
. ' WHERE id = '. (int) $this->sectionid
;
$db->setQuery( $query );
$this->sectionid = $db->loadResult();
$query = 'SELECT name'
. ' FROM #__categories'
. ' WHERE id = '. (int) $this->catid
;
$db->setQuery( $query );
$this->catid = $db->loadResult();
$query = 'SELECT name'
. ' FROM #__users'
. ' WHERE id = ' . (int) $this->created_by
;
$db->setQuery( $query );
$this->created_by = $db->loadResult();
}
return parent::toXML( $mapKeysToText );
}
[<! removed edit link to red link >] <! removed transcluded page call, red link never existed >
Examples
Code Examples