PHP运行总是报错数据表查询失败

数据表查询失败

<head>
   <title>论坛系统--列表页</title>
   <meta http-equiv="content-type" content="text/html;charset=utf-8">
   <link rel="stylesheet" type="text/css" href="style/style.css">
</head>
<body>
<!--页面头部:论坛logo-->
<div>
    <img src="image/logo.gif">
</div>
<?php
session_start();
if(isset($_SESSION["CURRENT_USER"])){
    $name = $_SESSION["CURRENT_USER"]["uName"];
    echo "您好: <a href='userdetail.php'>;$name</a> &nbsp;|&nbsp;<a href='doLogout.php'>登出</a>";
}else{
    echo"您尚未<a href='login.php'>登录</a>&nbsp;|&nbsp;<a href='reg.php'>注册</a>";
}
?>
</div>
<br>
<!--页面中部:论坛导航-->
<?php
require_once("comm/board.dao.php");//引入外部接口文件
require_once("comm/topic.dao.php");//引入外部接口文件
require_once("comm/reply.dao.php");//引入外部接口文件
$boardId = $_GET["boardId"];//采集地址栏传递的版块编号
$curPage = $_GET["currentPage"];//采集地址栏传递的列表页页码
$board = findBoard($boardId);//根据版块编号获取版块信息
$boardName = $board["boardName"];//从板块所有信息中提取板块名称
echo $boardName;
?>
<div>
    &gt;&gt;<a href="index.php"><b>论坛首页</b></a>
    &gt;&gt;<a href="list.php?boardId=<?php echo $boardId;?>&currentPage=1"><b><?php echo $boardName;?></b></a>
</div>
<br>
<!--页面中部:发帖链接-->
<div>
    <a href="post.php?boardId=<?php echo$boardId;?>"><img src="image/post.gif"></a>
</div>
<br>
<!--页面中部:分页处理与上下跳转-->
<?php
$num =  findCountReply($boardId); //用来统计某个板块的贴子总数
$pagesize = $GLOBALS["cfg"]["pagesize"];   //$GLOBALS用于获取全局范围内的变量,使用时需要做适量的修改,表示页面容量
$pages = $num%$pagesize==0?$num/$pagesize:(int)($num/$pagesize)+1;   //表示总页数
$text = "";//定义变量,存放上下页信息
if($curPage == 1){
    $text = "上一页|";
}else{
    $page = $curPage -1;
    $text = "<a href='list.php?boardId=$boardId&currentPage=$page'>上一页</a>|";
}
if($curPage == $pages){//如果页码为总页数,下一页不带超链接
    $text .="下一页|";
}else{
    $page = $curPage + 1;
    $text .="<a href='list.php?boardId=$boardId&currentPage=$page'>下一页</a> |";
}
$text .="当前第 $curPage 页 | 共 $pages 页";
echo $text;
?>
<!--页面中部:主贴列表布局设计-->
<div class="t">
    <table width="100%">
        <tr class="tr2" align='center'>
            <td width="5%">&nbsp;</td>
            <td width="75">话题</td>
            <td width="10">作者</td>
            <td width="10">回复</td>
        </tr>
<?php
$topics = findListTopic($page,$curPage);//查询某个板块下某一页的帖子列表信息,结果为二维数组
foreach($topics as $value){//循环访问某页帖子信息,每次将其中一条信息存入$value(一维数组)中
     $title = $value["title"];//从帖子信息中提取帖子标题
     $uName = $value["uName"];
     $topicId = $value["topicId"];
     $num = findCountReply($topicId);
     echo "<tr class='tr3'>
            <td align='center'><img src='image/topic.gif'></td>
            <td><a href='detail.php?boardId=$boardId&currentPage=$curPage&topic=$topicId&currentReplyPage=1'>$title</a></td>
            <td align='center'>$uName</td>
            <td align='center'>$num</td>
        </tr>";
}    
?>
    </table>
</div>
<br>
<!--页面尾部:版权信息-->
<div align="center">
    2020-2025 梦想中人版权所有
</div>
</body>