出错了,求指教!
<?php $page = $_GET['p']; $host = "localhost"; $username = 'root'; $password = ''; $db = 'test'; $conn = mysql_connect($host, $username, $password); if(!$conn){ echo "数据库连接失败"; exit; } mysql_select_db($db); mysql_query('SET NAMES UTF8'); $sql="SELECT * FROM page LIMIT".(($page-1) * 10).",10"; $result = mysql_query($sql); while($row = mysql_fetch_assoc($result)){ echo $row['id'].'-'.$row['name']; } ?>