I'm trying to figure out the vb:each stuff in the templates and it makes sense in some areas, and so much in others not in others. I have the following query:
Code:
$referrals = $db->query_read("
SELECT username, userid
FROM " . TABLE_PREFIX . "user
WHERE referrerid = '".$userinfo['userid']."'
AND usergroupid NOT IN (3,4)
ORDER BY username
");
Currently I am using the long-hand way of doing it with the while loop, but I would like to use the vb:each in the template and I can't for the life of me get it to work from a query. Can someone point me to how to set that up properly to use the vb:each?