mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-23 02:09:03 +02:00
Replaced the non standard IFNULL function which postgres does not know with the COALSCE function
This commit is contained in:
parent
33a5e70b70
commit
c58ff5861d
3 changed files with 16 additions and 4 deletions
|
@ -345,7 +345,7 @@ final class PartsDataTable implements DataTableTypeInterface
|
|||
//Calculate amount sum using a subquery, so we can filter and sort by it
|
||||
$builder->addSelect(
|
||||
'(
|
||||
SELECT IFNULL(SUM(partLot.amount), 0.0)
|
||||
SELECT COALESCE(SUM(partLot.amount), 0.0)
|
||||
FROM '.PartLot::class.' partLot
|
||||
WHERE partLot.part = part.id
|
||||
AND partLot.instock_unknown = false
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue