<?php
include("conn.php");
?>
<table width=500 border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#add3ef">
<?
$sql="select * form message";
$query=mysql_query($sql,$con);
if (!$sql) {
// add this check.
die("Error running $sql: " . mysql_error()); }
while($row=mysql_fetch_row($query)){
?>
<tr bgcolor="#eff3ff">
<td>标题:<?php echo $row['title'];?>
用户:<?php echo $row['user'];?></td>
</tr>
<tr bgColor="#ffffff">
<td>内容:<?php echo $row['content'];?> </td>
</tr>
<?
}
?>
</table>
为什么会出现Warning: mysql_fetch_row() expects parameter 1 to be resource
include("conn.php");
?>
<table width=500 border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#add3ef">
<?
$sql="select * form message";
$query=mysql_query($sql,$con);
if (!$sql) {
// add this check.
die("Error running $sql: " . mysql_error()); }
while($row=mysql_fetch_row($query)){
?>
<tr bgcolor="#eff3ff">
<td>标题:<?php echo $row['title'];?>
用户:<?php echo $row['user'];?></td>
</tr>
<tr bgColor="#ffffff">
<td>内容:<?php echo $row['content'];?> </td>
</tr>
<?
}
?>
</table>
为什么会出现Warning: mysql_fetch_row() expects parameter 1 to be resource
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货