好的,我有这个代码:
//this is the hi.php//
<?php
//highlight items//
$con = mysql_connect("localhost","root","");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("juliver", $con);
$result = mysql_query("SELECT * FROM hi WHERE pp='2'");
$hi = "";
while($row = mysql_fetch_array($result)) //<--- this is the line 13//
{
$hi .= "<div id='hicontainer'><a id='download_now' class='imgx' href='#?w=700' rel='popup'><img src='".$row['name']."' />";
$hi .= "<p>".$row['title']."</p>";
$hi .= "<a href='#?w=700' id='".$row['id']."' rel='popup' class='imgx'>View full</a> </div>";
}
//Lots of lots of code here I just specified those code which in error.//
mysql_close($con);
?>
这是我要实际显示输出的地方。
<td>
<!--highlight items-->
<div id="tbtitle">
<img src="Images/galleryicon.png"/><p>Highlight items</p>
</div>
<div id="tblgal">
<? echo $hi; ?>
</div>
</td>
但我收到一条错误消息:“警告:mysql_fetch_array() 期望参数 1 是资源,布尔值在第 13 行的 C:\xampp\htdocs\madeinusa\hi.php 中给出。”
拜托,我坚持这个。先感谢您。