its me again with yet another query.If this is going to be too complexed then i wont even bother...so heres the query.
I have the title,artist,name of the person & dedication message stored in mysql.May be this is stupid..is it possible to create xml file to retrieve the above four information from the database. I have coded the below on the xml file but not sure whats missing.The config.php has database connection information.
Many thanks for your help!!!! Nev
<?php
require("config.php");
$i=0;
$db = "SELECT * FROM songlist WHERE songtype='S' ORDER BY date_added DESC LIMIT 50";
$db = "SELECT songlist.artist, songlist.title, requestlist.name, requestlist.msg FROM songlist, requestlist WHERE requestlist.name <> '' and requestlist.songID = songlist.ID ORDER BY requestlist.t_stamp DESC LIMIT 20";
$count = 1;
while($results = $db->row())
{
$count++;
if(($count % 2)== 0)
?>
<?php echo('<?xml version="1.0" encoding="utf-8"?>'); ?>
<playlist version="1" xmlns="http://xspf.org/ns/0/">
<trackList>
<track>
<Song><?php echo $results['title']?></Song>
<album><![CDATA[<?php echo $results['artist']; ?>]]></album>
</track>
</trackList>
</playlist>
<?
$i++;
}
?>