Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in D:\wamp_demo\mypage.php on line 26
2016-03-28
<a href=" .$_SERVER['PHP_SELF'].'?p='.($page-1). ">上一页</a>
2016-03-10
$query="select goods_id,goods_name,goods_price from tdb_goods limit ".(空格)($page-1)*10(空格).",10";
$query="select goods_id,goods_name,goods_price from tdb_goods limit ".(($page-1)*10).",10";
这两种都可以
$query="select goods_id,goods_name,goods_price from tdb_goods limit ".(($page-1)*10).",10";
这两种都可以
2016-03-10
if($result&&$result->num_rows){
while( $row=$result->fetch_all(MYSQLI_ASSOC)){
echo $row['id'].'-'.$row['username'];
}
}
这里出错,说是id和username是undefined index
while( $row=$result->fetch_all(MYSQLI_ASSOC)){
echo $row['id'].'-'.$row['username'];
}
}
这里出错,说是id和username是undefined index
2016-03-08