![]() |
Hi, I'm have a weird problem, and I don't know how to fix it. I noticed that when using the withDeleted or onlyDeleted function of a model that has useSoftDeletes as true, it will add GROUP BY and ORDER BY to the query.
Here is the php code: PHP Code: $this->where('product_id', $productID)->selectSum('amount', 'total')->withDeleted()->first(); Code: SELECT SUM(`amount`) AS `total` Code: SELECT SUM(`amount`) AS `total` Code: SELECT SUM(`amount`) AS `total` |
Messages In This Thread |
model 'withDeleted()' - by needhelp202 - 01-02-2022, 03:08 PM
RE: model 'withDeleted()' - by iRedds - 01-03-2022, 12:12 AM
RE: model 'withDeleted()' - by kenjis - 01-03-2022, 03:32 AM
RE: model 'withDeleted()' - by iRedds - 01-03-2022, 05:41 AM
|