0
下面的简单查询没有返回任何结果。我看不到任何错误。任何想法为什么它不工作?简单查询不起作用
$sqlStr3 = "SELECT loginid,
username,
created
FROM login
ORDER BY created DESC
LIMIT 200";
$result = mysql_query($sqlStr3);
$count = 1;
$arr = array();
echo "<table class=\"samplesrec1edit\">";
while ($row = mysql_fetch_array($result)) {
$dt = new DateTime($row["created"], $tzFrom);
$dt->setTimezone($tzTo);
echo '<tr>';
echo '<td class="sitename1edit2a">'.$count++.'.</td>';
echo '<td class="sitename1edit1"><a href="http://www...com/.../members/index.php?profile='.$row["username"].'">'.stripslashes($row["username"]).'</a></td>';
echo '<td class="sitename1edit2">'.$dt->format('F j, Y &\nb\sp &\nb\sp g:i a').'</td>';
echo '</tr>';
}
echo "</table>";
有什么问题?什么var_dump $结果屈服...等...提供一些信息,所以我们可以帮助 – philfreo 2010-10-25 22:17:31