Mssql pagination query
$sql="SELECT * FROM(
SELECT row_number() OVER (ORDER BY TransactionID) AS No, p.*
FROM payflow_reporting p
$where_filter
) AS A
WHERE A.No BETWEEN (?) AND (?)";
$query=$this->db->query($sql, array( $offset, $limit));
return $query->result();
SELECT row_number() OVER (ORDER BY TransactionID) AS No, p.*
FROM payflow_reporting p
$where_filter
) AS A
WHERE A.No BETWEEN (?) AND (?)";
$query=$this->db->query($sql, array( $offset, $limit));
return $query->result();
No comments:
Post a Comment