@@ -198,7 +198,7 @@ function ADODB_Setup() {
198198 /**
199199 * ADODB version as a string.
200200 */
201- $ ADODB_vers = 'v5.22.5 2023-04-03 ' ;
201+ $ ADODB_vers = 'v5.22.6 2023-06-11 ' ;
202202
203203 /**
204204 * Determines whether recordset->RecordCount() is used.
@@ -1466,7 +1466,7 @@ function HasFailedTrans() {
14661466 * @param array|bool $inputarr holds the input data to bind to.
14671467 * Null elements will be set to null.
14681468 *
1469- * @return ADORecordSet|bool
1469+ * @return ADORecordSet|false
14701470 */
14711471 public function Execute ($ sql , $ inputarr = false ) {
14721472 if ($ this ->fnExecute ) {
@@ -1666,6 +1666,18 @@ function _Execute($sql,$inputarr=false) {
16661666 return $ rs ;
16671667 }
16681668
1669+ /**
1670+ * Execute a query.
1671+ *
1672+ * @param string|array $sql Query to execute.
1673+ * @param array $inputarr An optional array of parameters.
1674+ *
1675+ * @return mixed|bool Query identifier or true if execution successful, false if failed.
1676+ */
1677+ function _query ($ sql , $ inputarr = false ) {
1678+ return false ;
1679+ }
1680+
16691681 function CreateSequence ($ seqname ='adodbseq ' ,$ startID =1 ) {
16701682 if (empty ($ this ->_genSeqSQL )) {
16711683 return false ;
@@ -3554,20 +3566,21 @@ function qStr($s, $magic_quotes=false) {
35543566
35553567
35563568 /**
3557- * Will select the supplied $page number from a recordset, given that it is paginated in pages of
3558- * $nrows rows per page. It also saves two boolean values saying if the given page is the first
3559- * and/or last one of the recordset. Added by Iván Oliva to provide recordset pagination.
3569+ * Execute query with pagination.
35603570 *
3561- * See docs-adodb.htm#ex8 for an example of usage.
3562- * NOTE: phpLens uses a different algorithm and does not use PageExecute().
3571+ * Will select the supplied $page number from a recordset, divided in
3572+ * pages of $nrows rows each. It also saves two boolean values saying
3573+ * if the given page is the first and/or last one of the recordset.
35633574 *
3564- * @param string $sql
3565- * @param int $nrows Number of rows per page to get
3566- * @param int $page Page number to get (1-based)
3567- * @param mixed[]|bool $inputarr Array of bind variables
3568- * @param int $secs2cache Private parameter only used by jlim
3575+ * @param string $sql Query to execute
3576+ * @param int $nrows Number of rows per page
3577+ * @param int $page Page number to retrieve (1-based)
3578+ * @param array|bool $inputarr Array of bind variables
3579+ * @param int $secs2cache Time-to-live of the cache (in seconds), 0 to force query execution
3580+ *
3581+ * @return ADORecordSet|bool the recordset ($rs->databaseType == 'array')
35693582 *
3570- * @return mixed the recordset ($rs->databaseType == 'array')
3583+ * @author Iván Oliva
35713584 */
35723585 function PageExecute ($ sql , $ nrows , $ page , $ inputarr =false , $ secs2cache =0 ) {
35733586 global $ ADODB_INCLUDED_LIB ;
@@ -3743,6 +3756,7 @@ protected function getChangedErrorMsg($old = null) {
37433756 /**
37443757 * Internal placeholder for record objects. Used by ADORecordSet->FetchObj().
37453758 */
3759+ #[\AllowDynamicProperties]
37463760 class ADOFetchObj {
37473761 };
37483762
@@ -3982,11 +3996,20 @@ class ADORecordSet implements IteratorAggregate {
39823996 var $ _obj ; /** Used by FetchObj */
39833997 var $ _names ; /** Used by FetchObj */
39843998
3985- var $ _currentPage = -1 ; /** Added by Iván Oliva to implement recordset pagination */
3986- var $ _atFirstPage = false ; /** Added by Iván Oliva to implement recordset pagination */
3987- var $ _atLastPage = false ; /** Added by Iván Oliva to implement recordset pagination */
3999+ // Recordset pagination
4000+ /** @var int Number of rows per page */
4001+ var $ rowsPerPage ;
4002+ /** @var int Current page number */
4003+ var $ _currentPage = -1 ;
4004+ /** @var bool True if current page is the first page */
4005+ var $ _atFirstPage = false ;
4006+ /** @var bool True if current page is the last page */
4007+ var $ _atLastPage = false ;
4008+ /** @var int Last page number */
39884009 var $ _lastPageNo = -1 ;
4010+ /** @var int Total number of rows in recordset */
39894011 var $ _maxRecordCount = 0 ;
4012+
39904013 var $ datetime = false ;
39914014
39924015 public $ customActualTypes ;
0 commit comments