希望有人能给我一些帮助...我正在使用 PDO 从数据库中获取一些数据,但是每次脚本运行时它都会返回没有错误但不会显示所需的数据,我知道数据我正在寻找也在那里..任何帮助将不胜感激,这就是我目前所拥有的,谢谢。
$db = new PDO('sqlite:C:\\xampp\\htdocs\\Utils\\PDF_Utils\\PDF2Word\\details.sqlite');
echo "<table border=1>";
echo "<tr><td>FileID</td>
<td>File Name</td>
<td>Email From</td>
<td>CC</td> <td>Subject</td>
<td>File Size</td></tr>";
$contents = $db->prepare("SELECT * FROM details WHERE fileName =
'$yourFileName'");
$contents->execute();
foreach($contents as $row) {
echo "<tr><td>" . $row['FileID'] . "</td>";
echo "<td>" . $row['fileName'] . "</td>";
echo "<td>" . $row['emailFrom'] . "</td>";
echo "<td>" . $row['CC'] . "</td>";
echo "<td>" . $row['subject'] . "</td>";
echo "<td>" . $row['fileSize'] . "</td></tr>";
}
echo "</table>";