This works but it's only giving the me the first result from the DB and not a full list.
PHP Code:
$dingx = $vbulletin->db->query_first("SELECT * FROM ding");
// ##### Lets wrap it up and display the results #####
eval('$dingx = "' . fetch_template('ding_bits') . '";');
eval('print_output("' . fetch_template('ding') . '");');
I assume I need to add a while condition after $dingx?
PHP Code:
$dingx = $vbulletin->db->query_read("SELECT * FROM ding");
while ($ding = $vbulletin->db->fetch_array($dingx))
{
echo $ding['userid'], $ding['charname'], $ding['charlvl'];
}
// Finish up.
eval('$dingx = "' . fetch_template('ding_bits') . '";');
eval('print_output("' . fetch_template('ding') . '");');
I tried that and it works but its not placing the results in the template. What would be the correct way of doing this?