jus
02-05-2005, 12:16 AM
I've got my rss feed to validate now, through using CDATA tags to surround all the parts using any html. I've got my last 7 entries on the feed. I'd like the newest of the 7 to be at the top. At the moment, it's the oldest.
I don't have any experience with SQL, so if anyone can suggest how to put this right.... I think that this is the code concerned...
$query = mysql_query("select id,datetime,headline,body,image from ".$pixelpost_db_prefix."pixelpost where (datetime<='$cdate') order by datetime desc limit 0,7");
while(list($id,$datetime,$headline,$body,$image) = mysql_fetch_row($query)) {
$headline = pullout($headline);
$body = pullout($body);
// $image = $cfgrow['siteurl']."thumbnails/thumb_$image";
$image = $cfgrow['siteurl']."images/$image";
$datetime = strtotime($datetime);
$datetime = date("r",$datetime);
$body = stripslashes($body);
$body = htmlentities($body);
$body = ereg_replace("\n","<br />",$body);
I tried to change the desc to asc in the query order section, and it just took the first 7 posts I ever made. So, can it pull the same 7 records, but in reverse order?
Thanks for any help!
I don't have any experience with SQL, so if anyone can suggest how to put this right.... I think that this is the code concerned...
$query = mysql_query("select id,datetime,headline,body,image from ".$pixelpost_db_prefix."pixelpost where (datetime<='$cdate') order by datetime desc limit 0,7");
while(list($id,$datetime,$headline,$body,$image) = mysql_fetch_row($query)) {
$headline = pullout($headline);
$body = pullout($body);
// $image = $cfgrow['siteurl']."thumbnails/thumb_$image";
$image = $cfgrow['siteurl']."images/$image";
$datetime = strtotime($datetime);
$datetime = date("r",$datetime);
$body = stripslashes($body);
$body = htmlentities($body);
$body = ereg_replace("\n","<br />",$body);
I tried to change the desc to asc in the query order section, and it just took the first 7 posts I ever made. So, can it pull the same 7 records, but in reverse order?
Thanks for any help!