时间:2021-07-01 10:21:17 帮助过:5人阅读
$dbh = new PDO($dbConnString, $dbInfo['username'], $dbInfo['password']);
$query = $dbh->query($queryString);
$i = 0;
foreach ($query as $query2) {
$queryReturn[$i] = $query2;
$i++;
}
delimiter //后这样执行
CREATE PROCEDURE `test`()
begin
select SQL_CALC_FOUND_ROWS * from table limit 1,10;
select FOUND_ROWS();
end;
//
$queryString = 'call test();';
$query = $dbh->query($queryString);
do {
$rows = $query->fetchAll();
print_r($rows);
}while($query->nextRowset());