我正在尝试使用以下脚本从表中获取用户数据
//if session detected connect to database using pdo
$db = getConnection();
$user = getUser();
//qry the databse
$stmt = $db->prepare("SELECT * FROM saved_holidays WHERE subscriberID = :email");
$stmt->bindParam(":email", $user);
echo "<br></br>
<table border='2' align='left' width='700'>
<th align='left'>HolidayID</th>
<th align='left'>SubscriberID</th>
<th align='left'>Link</th>
<th align='left'>Published</th>
<th align='left'>Title</th>
<th align='left'>Description</th>
<th align='left'>Saved</th>
<br></br>
<br></br>";
while($obj = $stmt->fetchObject())
{
echo "<tr><td>".$obj->holidayID."</td><td>".$obj->subcriberID."</td><td>".$obj->link."</td><td>".
$obj->pubDate."</td><td>".$obj->title ."<td>".$obj->dateSaved."</td><br/>\n"."</td></tr>";
}
echo "</table>
<br></br>
<br></br>";
我没有收到任何错误消息,但也没有收到期望的输出。我得到的只是表格标题,做错了什么?