Welcome Guest, Not a member yet? Register   Sign In
Search Results
    Thread: How to loop pagination links using for loop instead of using foreach loop
Post: RE: How to loop pagination links using for loop in...

InsiteFX Wrote: (06-09-2022, 04:09 AM) -- Then you must have something wrong in your code because I use both of those for displaying Page 1 of 25 etc; And they work just fine. No I didn't mean I g...
3,215 Views
8 Replies
06-09-2022, 07:50 AM
venance
    Thread: How to loop pagination links using for loop instead of using foreach loop
Post: RE: How to loop pagination links using for loop in...

InsiteFX Wrote: (06-09-2022, 12:11 AM) -- getCurrentPageNumber() This method returns the page number of the current page. getPageCount() This method returns total number of pages. Yes exactly...
3,215 Views
8 Replies
06-09-2022, 01:17 AM
venance
    Thread: How to loop pagination links using for loop instead of using foreach loop
Post: RE: How to loop pagination links using for loop in...

Thank you very much @"webdeveloper"  and @"includebeer" !. Since I get trouble about extending Pager class,  I have decided to add some methods to straight to the system with namespace: CodeIgniter\Pa...
3,215 Views
8 Replies
06-08-2022, 09:30 PM
venance
    Thread: How to loop pagination links using for loop instead of using foreach loop
Post: RE: How to loop pagination links using for loop in...

Thank you @"webdeveloper" very much! It's working as expected, But I have a question about setting up the counter to begin with 1 instead of  0, PHP Code: --         -- The purpose of doing...
3,215 Views
8 Replies
06-08-2022, 01:22 PM
venance
    Thread: How to loop pagination links using for loop instead of using foreach loop
Post: How to loop pagination links using for loop instea...

Hello everyone, I'm trying to loop link in my pagination template view, I want to be able to check various condition with the counter, for example: PHP Code: --        -- But I want to ...
3,215 Views
8 Replies
06-08-2022, 07:31 AM
venance
    Thread: How to extend PagerRenderer and add additional methods
Post: How to extend PagerRenderer and add additional met...

Hello, I'm trying to extend pagination of codeigniter4, so I can be able to use it with ajax. If I add directly my custom method to CodeIgniter\Pager\PagerRenderer, they works fine. But I want to use...
2,843 Views
4 Replies
09-21-2021, 04:05 AM
venance
    Thread: How to work with cookie and redirect in codeigniter 4
Post: RE: How to work with cookie and redirect in codeig...

I have solved my issue by using php function PHP Code: -- setcookie() -- or using PHP Code: -- redirect()->to('urlname')->setCookie("name", "value", time()); --
1,765 Views
2 Replies
09-10-2021, 08:42 AM
venance
    Thread: How to work with cookie and redirect in codeigniter 4
Post: How to work with cookie and redirect in codeignite...

Hello everyone. I'm working with codeigniter4 where I want to be able to store cookie and then redirect to another page. If I set a cookie without including redirection process, Cookie stores success...
1,765 Views
2 Replies
09-10-2021, 04:31 AM
venance
    Thread: How to Check if database connection exists Ci4
Post: How to Check if database connection exists Ci4

I'm trying to check id database connection exist or not then redirect to a page where a user can be able to create a database through form inputs. Here's what I tried to do but not succeed. PHP...
2,531 Views
1 Replies
07-14-2021, 12:11 AM
venance
    Thread: Controller in subdirectory
Post: RE: Controller in subdirectory

Nice if you have solved the issue.
4,207 Views
4 Replies
06-24-2021, 03:45 PM
venance
    Thread: Controller in subdirectory
Post: RE: Controller in subdirectory

You need to specify the namespace and the namespace of the extended class or BaseController. PHP Code: -- //routes $routes->get('/api/(:any)', 'Api\Internal::bounce/$1'); //controller inside Api di...
4,207 Views
4 Replies
06-19-2021, 04:03 PM
venance
    Thread: Help writing Sql with CI4 active record
Post: Help writing Sql with CI4 active record

Hello. I 'm struggling to write sql with subquery, How can I write it with codeigniter methods. Thanks! //SQL PHP Code: -- SELECT p.id, p.catId, p.image, c.id, (c.name) as category             ...
1,408 Views
2 Replies
03-25-2021, 01:13 AM
venance
    Thread: Help with Codeigniter v4 pagination Library
Post: RE: Help with Codeigniter v4 pagination Library

Thank you all for the support and help, I carefully followed your device and I get a solution to my issue. I'd like to hear if this solution has no down effect to the app performance. Here is what...
3,542 Views
6 Replies
03-23-2021, 06:16 AM
venance
    Thread: Help with Codeigniter v4 pagination Library
Post: RE: Help with Codeigniter v4 pagination Library

InsiteFX Wrote: (03-22-2021, 08:47 PM) -- Pager works just fine with Query Builder, do what you want in the model with Query Build but do not tell it to return a result set instead return $this Then...
3,542 Views
6 Replies
03-23-2021, 12:49 AM
venance
    Thread: Help with Codeigniter v4 pagination Library
Post: RE: Help with Codeigniter v4 pagination Library

php_rocs Wrote: (03-22-2021, 08:59 AM) -- @venance, ...or use something like DataTables (https://datatables.net/) -- I know the datatable is great, But I really don't like. I like codeigniter 4 pa...
3,542 Views
6 Replies
03-22-2021, 12:12 PM
venance
    Thread: Help with Codeigniter v4 pagination Library
Post: Help with Codeigniter v4 pagination Library

Hello, I found pagination library for Codeigniter v4 on github with this link https://github.com/KejawenLab/CI4Pager (https://github.com/KejawenLab/CI4Pager) . I followed every step, But I get issue o...
3,542 Views
6 Replies
03-22-2021, 08:27 AM
venance
    Thread: how to write this sql with active record
Post: RE: how to write this sql with active record

php_rocs Wrote: (03-18-2021, 11:35 AM) -- @venance, Have you considered using something like Datatables (https://datatables.net/)?  Then you don't have to worry about pageination. Or you could ...
2,331 Views
4 Replies
03-18-2021, 12:38 PM
venance
    Thread: how to write this sql with active record
Post: RE: how to write this sql with active record

php_rocs Wrote: (03-18-2021, 08:09 AM) -- @venance, Have you thought about using query binding (https://codeigniter.com/user_guide/database/queries.html?highlight=sql#query-bindings) instead?  Thi...
2,331 Views
4 Replies
03-18-2021, 08:23 AM
venance
    Thread: how to write this sql with active record
Post: how to write this sql with active record

Hello everyone, I'm trying to calculate profit from two tables province_income and province_expenses. But I'm getting difficult to organize sql statement with ci4 query methods to make it work. Help...
2,331 Views
4 Replies
03-18-2021, 01:47 AM
venance
    Thread: How to get data of joined table using query() method
Post: RE: How to get data of joined table using query() ...

iRedds Wrote: (02-22-2021, 05:12 AM) -- I already told you that query() and paginate() are not linked and cannot be linked in principle. You have two options, either use QueryBuilder or implement th...
2,760 Views
6 Replies
02-22-2021, 06:04 AM
venance

Theme © iAndrew 2016 - Forum software by © MyBB