Class ilChatroomConverter.
More...
Detailed Description
Member Function Documentation
ilChatroomConverter::backupHistoryToXML |
( |
| ) |
|
Definition at line 15 of file class.ilChatroomConverter.php.
References $ilDB, $res, and $row.
{
SELECT chat_id, room_id
FROM chat_room_messages
GROUP BY chat_id, room_id
");
$chat_room_id_comb = array();
{
$chat_room_id_comb[] = array(
$row[
'chat_id'],
$row[
'room_id'] );
}
foreach( $chat_room_id_comb as $combination )
{
SELECT *
FROM chat_room_messages
WHERE chat_id = %s
AND room_id = %s",
array( 'integer', 'integer' ),
array( $combination[0], $combination[1] )
);
$xml = new SimpleXMLElement('<entries />');
$xml->addAttribute('chat_id', $combination[0]);
$xml->addAttribute('room_id', $combination[1]);
{
$child = $xml->addChild(
'entry',
$row[
'message']);
$child->addAttribute(
'timestamp',
$row[
'commit_timestamp']);
}
$xml->asXML();
}
}
The documentation for this class was generated from the following file: