I've got a php rss script but need help adjusting it for a new site...can anyone help, I know it relates to the tables in the DB...
umm and which rss script are you talking about its really tough to say anything withour have full info
I think, he already have some script with him.., and he needs us to change as his wish..!!! Am i correct friend.
Ok the Php source code is below in the rss.php file: I know this script relates to sketches, sketch>id fields etc., from the other DB. In my current DB I want to use the step1_sets field (see 001.gif) and attach the details within this field to use...see 002.gif. Hope this helps, thanks guys! <?php include("functions/db.php"); header('Content-Type: text/xml; charset=utf-8'); $number_of_items = 20; if (isset($_GET['artist'])) { $artist = $_GET['artist']; $artist_m = url_2_usr(mysql_real_escape_string($_GET['artist'])); $where = "WHERE owner = '".$artist_m."' ORDER BY id DESC"; } else { $where = "ORDER BY id DESC"; } $sql = "SELECT * FROM sketches $where LIMIT 0, $number_of_items"; $sketches = $db->get_results($sql); echo '<?xml version=\'1.0\' encoding=\'UTF-8\'?>'; echo ' <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> '; echo ' <channel> '; if (isset($_GET['artist'])) { echo '<title>'.$sketch->owner.' INFO</title> <description>DESCRIPTION</description> <link>http://www.SITE.COM/artists/'.$artist.'/</link> <atom:link href="http://www.SITE.COM/feed/'.$artist.'/" rel="self" type="application/rss+xml" />'; } else { echo '<title>SITE</title> <description>DESCRIPTION</description> <link>http://www.SITE.com/</link> <atom:link href="http://www.SITE.com/feed/" rel="self" type="application/rss+xml" />'; } if ($sketches) { foreach ($sketches as $sketch) { $sketch_owner_m = usr_2_url($sketch->owner); echo ' <item> <title>'.$sketch->title.' by '.$sketch->owner.'</title> <description>'.$sketch->tags.' <![CDATA[<p style="text-align: center"><a href="http://www.SITE.com/artists/'.usr_2_url($sketch->owner).'/'.$sketch->id.'/"><img class="sketch" src="http://www.SITE.com/php/images/'.$sketch->url.'.gif" border="0" alt="'.$sketch->title.'" /></a></p>]]></description> <link>http://www.SITE.com/artists/'.$sketch_owner_m.'/'.$sketch->id.'/</link> <guid>http://www.SITE.com/artists/'.$sketch_owner_m.'/'.$sketch->id.'/</guid> </item>'; } } echo ' </channel> </rss>'; ?> PHP: