Serge
08-08-2003, 03:08 PM
Ok I'm having a problem. I have this script to pull 3 threads from the database to use as news on my main site:
// Get the news
$temp = $DB_site->query("SELECT threadid, title, forumid, postusername, postuserid, lastposter, dateline, firstpostid FROM thread WHERE forumid=47 ORDER BY dateline DESC LIMIT 3");
while ($news = $DB_site->fetch_array($temp))
{
$post = $news['firstpostid'];
$date = vbdate($vboptions['dateformat'], $news['dateline']);
$text = $DB_site->query("SELECT pagetext FROM post WHERE postid=$post");
$newstext = $DB_site->fetch_array($text);
eval('$newsbit = "' . fetch_template('home_newsbit') . '";');
}
After the newsbit I call another forum that has the newsbit in it so it is not a problem with it not showing up but I asked for three and I only get one and it is the third one. Is there a way I need to recode it so I get the newbit called three times and it all stays?
// Get the news
$temp = $DB_site->query("SELECT threadid, title, forumid, postusername, postuserid, lastposter, dateline, firstpostid FROM thread WHERE forumid=47 ORDER BY dateline DESC LIMIT 3");
while ($news = $DB_site->fetch_array($temp))
{
$post = $news['firstpostid'];
$date = vbdate($vboptions['dateformat'], $news['dateline']);
$text = $DB_site->query("SELECT pagetext FROM post WHERE postid=$post");
$newstext = $DB_site->fetch_array($text);
eval('$newsbit = "' . fetch_template('home_newsbit') . '";');
}
After the newsbit I call another forum that has the newsbit in it so it is not a problem with it not showing up but I asked for three and I only get one and it is the third one. Is there a way I need to recode it so I get the newbit called three times and it all stays?