fix canocat for postgres, #32.
This commit is contained in:
parent
1a72664f73
commit
45955a4730
1 changed files with 2 additions and 1 deletions
|
@ -25,10 +25,11 @@ class DB
|
|||
}
|
||||
|
||||
// CONCAT() does not exist in SQLite, using || instead
|
||||
// for postgres, ERROR: could not determine data type of parameter $1
|
||||
public final static function concat(){
|
||||
$values = func_get_args();
|
||||
|
||||
if(DB::connection() === 'sqlite') {
|
||||
if(DB::connection() === 'sqlite' || DB::connection() === 'postgres') {
|
||||
return implode(" || ", $values);
|
||||
} else {
|
||||
return 'CONCAT('.implode(", ", $values).')';
|
||||
|
|
Loading…
Reference in a new issue