Topic: Question about viewtopic.php
I'm trying to pull a number from another table from within viewtopic.php and display them next to the user's name in each post.
So I insert my code after checking if the user is a member at around line 200:
if ($cur_post['poster_id'] > 1) {
//
// show trader feedback
//
$number_of_ratings=0;
// get total feedback for user and display it
$result = $db->query('SELECT trade_ref FROM '.$db->prefix.'traderfeedback WHERE id='.$cur_post['poster_id']) or error('Unable to fetch feedback', __FILE__, __LINE__, $db->error());
$number_of_ratings=$db->num_rows($result);
$feedback="Trader Rating (<a href='trader.php?action=view&id=".$cur_post['poster_id']."'>".$number_of_ratings."</a>)";
//
// end trader feedback
//.
.
.
For some reason the db query I inserted seems to end the loop.
Only 1 post is ever displayed, even though there may be many.
Any guidance much appreciated.