不可能!
这与是否有记录无关

解决方案 »

  1.   

    <body>
    <div id="Layer1" style="position:absolute; width:559px; height:49px; z-index:3; left: 136px; top: 77px;">
     <?php include("head.htm");?>
    </div>
    <?
    //(前面程序略)
    include("pageft.php"); //包含"pageft.php”文件
    //取得总信息数
    $connect=mysql_connect("localhost","root","netxfly") or die("Could not connect:".mysql_error());
    mysql_select_db("radius") or die("Could not select database");
    $result=mysql_query("select radcheck.username,groupname from radcheck,usergroup where radcheck.username=usergroup.username order by radcheck.id");
    $total=mysql_num_rows($result);
    //调用pageft(),每页显示10条信息(使用默认的20时,可以省略此参数),使用本页URL(默认,所以省略掉)。
    pageft($total,5);
    //现在产生的全局变量就派上用场了:
    $result=mysql_query("select radcheck.id,radcheck.username,groupname from radcheck,usergroup where radcheck.username=usergroup.username order by radcheck.id limit $firstcount,$displaypg ");
    ?>
    <div id="Layer2" style="position:absolute; width:572px; height:84px; z-index:2; left: 136px; top: 150px;">
    <table width="552">
    <tr>
    <td align="center"  width="80%" bgcolor="#FFFFFF" valign="bottom"><strong>
      注册用户信息
     </strong></td>
     </tr><td>
    <table width="552" border="1" align="center" bgcolor="#E8F1FF"> <TR>
        <TH width="152" align="center">ID号</TH>
    <TH width="203" align="center">用户名</TH>
    <TH width="175" align="center">所在组</TH>
    <?php
    if(moduser==true){
       print "\t\t<th width='138'>操作</th>\n";
     }
     if(deluser==true){
      print "\t\t<th width='138'>操作</th>\n";
     }
    ?>
    </tr>
    <?php
    while($row=mysql_fetch_array($result,MYSQL_ASSOC)){
    //(列表内容略)
     print "\t<tr>\n";        foreach ($row as $col_value) {
                print "\t\t<td align='center'>$col_value</td>\n";

            }

    if(moduser==true){
      print"<TD align='center'><A href='modifyradcheck.php?id=$row[id]&username=$row[username]'>修改密码</A></TD>";
      }
     if(deluser==true)
      print"<TD align='center'><A href='delRadcheck.php?id=$row[id]&username=$row[username]' onClick='return delcheck();'>删除</A></TD>";
            print "\t</tr>\n";
        }
        print "</table>\n"; /* 释放资源 */
      mysql_free_result($result);
       /* 断开连接 */
      mysql_close($connect);
    ?>
    </tr>
    <tr>
    <td><?php
    if(adduser==true){
      print"<tr><td colspan='7' align='center'><A href='addradcheck.php' target='manager'>添加</A></td></tr>";
     }
    ?>
    </td>
    </tr>
    </table>
    </td></tr>
    </table>
    <table width="20">
    <tr>
    <td>
    <?php
    echo $pagenav;
    ?>
    </td>
    </tr>
    </table>
    <?php include("foot.php");?>
    </div>