FIX Use the SQL standard for the if confition
This commit is contained in:
parent
d24120d6f9
commit
e81c118a27
@ -77,7 +77,8 @@ abstract class DoliDB implements Database
|
|||||||
*/
|
*/
|
||||||
public function ifsql($test, $resok, $resko)
|
public function ifsql($test, $resok, $resko)
|
||||||
{
|
{
|
||||||
return 'IF('.$test.','.$resok.','.$resko.')';
|
//return 'IF('.$test.','.$resok.','.$resko.')'; // Not sql standard
|
||||||
|
return '(CASE WHEN '.$test.' THEN '.$resok.' ELSE '.$resko.' END)';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user