语句有问题求解决
<?php
global $dbh;
$page=$_GET['p'];
$pagesize=10;
require_once('../connect.php');
$sql_record="SELECT*FROM article LIMIT"." " .($page-1)*$pagesize .",$pagesize";
$stmt_record=$dbh->prepare($sql_record);
$res_record=$stmt_record->execute();
if($res_record){
while($row=$stmt_record->fetch(PDO::FETCH_ASSOC)){
$data[]=$row;
}
}else{
$data=array();
}
$stmt_count=$dbh->query("SELECT COUNT(*) FROM article");
var_dump( $stmt_count);
$count=$stmt_count->fetchColumn();
?>