错误呀,是什么问题
$sql="SELECT * FROM shop_goods LIMIT".($page-1) * 10.",10";这个报错是怎么回事?
$sql="SELECT * FROM shop_goods LIMIT".($page-1) * 10.",10";这个报错是怎么回事?
2015-06-10
<?php $page=$_GET['p']; define('HOST','LOCALHOST'); define('USERNAME','root'); define('PASSWORD','root'); $db="test"; if(!($con = mysql_connect(HOST, USERNAME, PASSWORD))){ echo mysql_error(); } if(!mysql_select_db($db)){ echo mysql_error(); } if(!mysql_query('set names utf8')){ echo mysql_error(); } $sql="SELECT * FROM page LIMIT '.($page-1) *10.',10"; $result= mysql_query($sql); while($row=mysql_fetch_assoc($result)){ echo $row['id'].'-'.$row['name']; } ?>
没有什么反应怎么办
举报