首先代码献,
public function GetArticlePage2016($article_type_id, $where, $pageindex, $pagesize) { $data = array(); $stmt = mssql_init("Article_Page_2016"); mssql_bind($stmt, "@article_type_id", $article_type_id, SQLINT4); mssql_bind($stmt, "@where", $where, SQLVARCHAR); mssql_bind($stmt, "@pageindex", $pageindex, SQLINT4); mssql_bind($stmt, "@pagesize", $pagesize, SQLINT4); mssql_bind($stmt, "@count", $count, SQLINT4, $is_output = TRUE); $rs = mssql_execute($stmt, FALSE); mssql_next_result($rs); $num = 0; while ($row = mssql_fetch_assoc($rs)) { $data['rs'][$num] = $row; $num++; } $data['count'] = $count; return $data; }
没错,“Article_Page_2016”就是mssql 离得存储过程