File tree Expand file tree Collapse file tree 5 files changed +5
-5
lines changed Expand file tree Collapse file tree 5 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 11
11
{
12
12
$ stmt = $ pdo ->prepare ('SELECT * FROM users where id > :skip LIMIT :limit ' );
13
13
$ stmt ->execute (['limit ' => $ limit , 'skip ' => $ skip ]);
14
- return $ stmt ->fetchAll ( );
14
+ return $ stmt ->fetch (\ PDO :: FETCH_NUM );
15
15
};
16
16
17
17
$ perPage = 100 ;
Original file line number Diff line number Diff line change 12
12
{
13
13
$ stmt = $ pdo ->prepare ('SELECT * FROM users where id > :skip LIMIT :limit ' );
14
14
$ stmt ->execute (['limit ' => $ limit , 'skip ' => $ skip ]);
15
- return $ stmt ->fetchAll ( );
15
+ return $ stmt ->fetch (\ PDO :: FETCH_NUM );
16
16
};
17
17
18
18
$ counter = function () use ($ pdo ): int { //this function should return integer value of total count of items.
Original file line number Diff line number Diff line change 12
12
{
13
13
$ stmt = $ pdo ->prepare ('SELECT * FROM users where id > :skip LIMIT :limit ' );
14
14
$ stmt ->execute (['limit ' => $ limit , 'skip ' => $ skip ]);
15
- return $ stmt ->fetchAll ( );
15
+ return $ stmt ->fetch (\ PDO :: FETCH_NUM );
16
16
};
17
17
18
18
$ counter = function () use ($ pdo ): int { //this function should return integer value of total count of items.
Original file line number Diff line number Diff line change 10
10
{
11
11
$ stmt = $ pdo ->prepare ('SELECT * FROM users LIMIT :limit OFFSET :offset ' );
12
12
$ stmt ->execute (['limit ' => $ limit , 'offset ' => $ skip ]);
13
- return $ stmt ->fetchAll ( );
13
+ return $ stmt ->fetch (\ PDO :: FETCH_NUM );
14
14
};
15
15
16
16
$ perPage = 100 ;
Original file line number Diff line number Diff line change 12
12
{
13
13
$ stmt = $ pdo ->prepare ('SELECT * FROM users LIMIT :limit OFFSET :offset ' );
14
14
$ stmt ->execute (['limit ' => $ limit , 'offset ' => $ skip ]);
15
- return $ stmt ->fetchAll ( );
15
+ return $ stmt ->fetch (\ PDO :: FETCH_NUM );
16
16
};
17
17
18
18
$ counter = function () use ($ pdo ): int { //this function should return integer value of total count of items.
You can’t perform that action at this time.
0 commit comments