关于discuz查询的一个问题,希望高手们指点一下哦。小弟在这里先谢谢了。我先把我的例子写出来吧。space_home.php 中是这个样子的。$sql = "select uid,username from pre_common_member where status = 0 limit 0,16";
$result = mysql_query($sql);
while($rs = mysql_fetch_assoc($result))
{
$hotlist_mi[] = $rs['username'];
}space_home.htm 中石这个样子的。<!--{loop $hotlist_mi $value}-->
<ul class="xiaoqu"><li><img src="http://localhost/discuz/uc_server/avatar.php?uid=1&size=middle" width="45" height="45" /><br />$value<br />加为好友</li></ul>
<!--{/loop}-->红色字体输出的是用户名。而现在的问题是我想在输出uid;请高手帮一下忙,看看啦
$result = mysql_query($sql);
while($rs = mysql_fetch_assoc($result))
{
$hotlist_mi[] = $rs['username'];
}space_home.htm 中石这个样子的。<!--{loop $hotlist_mi $value}-->
<ul class="xiaoqu"><li><img src="http://localhost/discuz/uc_server/avatar.php?uid=1&size=middle" width="45" height="45" /><br />$value<br />加为好友</li></ul>
<!--{/loop}-->红色字体输出的是用户名。而现在的问题是我想在输出uid;请高手帮一下忙,看看啦
$result = mysql_query($sql);
while($rs = mysql_fetch_assoc($result))
{
$hotlist_mi[] = $rs['uid'];
}
$result = mysql_query($sql);
while($rs = mysql_fetch_assoc($result)){
$hotlist_mi[] = $rs['uid']." ".$rs['username'];
}
$result = mysql_query($sql);
while($rs = mysql_fetch_assoc($result))
{
$hotlist_mi[] = $rs;
}<!--{loop $hotlist_mi $value}-->
<ul class="xiaoqu"><li><img src="http://localhost/discuz/uc_server/avatar.php?uid=$value['uid']&size=middle" width="45" height="45" /><br />$value['username']<br />加为好友</li></ul>
<!--{/loop}-->