0
<?php
$ls_query = "select * from (SELECT ROW_NUMBER() OVER(ORDER BY ID) AS RowNumber, ID, col1 from table where col1 = 'xxxxx') as temp where RowNumber BETWEEN 1 AND 10 order by col1";
$result = sqlsrv_query($conn, $ls_query);
$no_of_rows = sqlsrv_num_rows($result);
echo $no_of_rows;
?>

执行此脚本时,我得到(30 秒后):

500内部服务器错误。您要查找的资源有问题,无法显示。

在 SQL Server 中执行查询时,需要 1 分钟才能运行,但会给出结果。

减少或增加 php.ini 中的 max_execution_time 无效。如果我将 max_execution_time 更改为 2。它仍然在 30 秒内给出相同的错误

4

0 回答 0