I have the following code (cut down a little)
<?
$t->set_file("Admins", $template['admins']);
$t->set_block('Admins', 'admin_block', 'a_block');
$sql = "SELECT user_id, username, user_avatar, user_avatar_type, user_icq, user_from, user_msnm FROM `" . $forums_table['users'] . "` WHERE user_level = 1 ORDER BY user_id ASC";
$result = @mysql_query($sql);
if (!$result) {
echo('<p>Error performing query:' . mysql_error() . '</p>');
}
while ( $row = mysql_fetch_array($result) ) {
<SNIP>
$t->set_var(array(
"AVATAR" => "$user_avatar",
"NAME" => $row['username'],
"LOCATION" => $row['user_from'],
"PM" => "$user_pm",
"EMAIL" => "$user_email",
"ICQ" => $row['user_icq'],
"MSN" => "$user_msn",
"PROFILE_LINK" => "$profile_link",
));
$t->parse('a_block', 'admin_block', true);
}
?>
yet when i pparse this, or at the end, it only displays ONE result, and there is meant to be 2. I cannot get it to work with the while... when using it with a loop for() it works... but i want it to work with a MySQL array!
Any links to tutorials will help as well!