Masked Crusader
12-22-2010, 05:22 PM
Hey all.
I am porting one of my custom created products over to vB4 and am having a problem with one specific area.
Here is what my code looked like in vB3.8:
foreach ($user_ratings as $rating){
$result = $db->query("SELECT username FROM user WHERE userid='{$rating['user_start']}'");
$username = mysql_fetch_assoc($result);
$username = $username['username'];
$date = substr($rating['rating_date'], 0, strpos($rating['rating_date'], " "));
eval('$processedstuff .= "' . fetch_template('total_ratings_loop') . '";');
}
Now, of course, that eval was grabbing the template "foreach" rating that was available. My question is, how can I do this same thing in vB4. I want it to fetch this particular template each time through the "foreach" loop.
Thanks!
I am porting one of my custom created products over to vB4 and am having a problem with one specific area.
Here is what my code looked like in vB3.8:
foreach ($user_ratings as $rating){
$result = $db->query("SELECT username FROM user WHERE userid='{$rating['user_start']}'");
$username = mysql_fetch_assoc($result);
$username = $username['username'];
$date = substr($rating['rating_date'], 0, strpos($rating['rating_date'], " "));
eval('$processedstuff .= "' . fetch_template('total_ratings_loop') . '";');
}
Now, of course, that eval was grabbing the template "foreach" rating that was available. My question is, how can I do this same thing in vB4. I want it to fetch this particular template each time through the "foreach" loop.
Thanks!