when I use countAll, it's seem without deleted_at query - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28) +--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30) +--- Thread: when I use countAll, it's seem without deleted_at query (/showthread.php?tid=78553) |
when I use countAll, it's seem without deleted_at query - asrahi - 02-06-2021 Hi! When I use countAll(), It's seem without deleted_at query. How can I with deleted_at when I call countAll()? Code: Database (4 Queries across 0 Connection) I guess first line, $model->countAllResults(false) sec line, $model->countAll(false) 3rd line, $model->paginate(20) list line, $model->pager p.s I changed defualt set 'deleted_at' to 'date_del' thank you RE: when I use countAll, it's seem without deleted_at query - kenjis - 02-07-2021 It seems it is a bug. There is no `countAll()` method in CodeIgniter\Model. RE: when I use countAll, it's seem without deleted_at query - asrahi - 02-09-2021 (02-07-2021, 02:40 AM)kenjis Wrote: It seems it is a bug. How Can I know rows count when I use with model? should I don't use $model->countAll() or $model->countAllResults() ?? RE: when I use countAll, it's seem without deleted_at query - kenjis - 02-09-2021 When you use soft deletes, you can use `countAllResults()`. And you can use Query Builder. https://codeigniter4.github.io/CodeIgniter4/models/model.html#working-with-query-builder With Query Builder, you can make any SQL query. RE: when I use countAll, it's seem without deleted_at query - asrahi - 02-13-2021 Code: public function countAll(bool $reset = true, bool $test = false){ I used override method like this. |