Bug 1737 fixed : merge from trunk
Concatenation error with POstgreSQL Simplify same function for SQLite git-svn-id: http://piwigo.org/svn/branches/2.1@6581 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
parent
1661af7f3f
commit
c04a906ec4
3 changed files with 4 additions and 10 deletions
|
@ -413,9 +413,7 @@ function pwg_db_concat($array)
|
|||
|
||||
function pwg_db_concat_ws($array, $separator)
|
||||
{
|
||||
$glue = sprintf(' || \'%s\' || ', $separator);
|
||||
|
||||
return implode($array, $glue);
|
||||
return implode($array, ' || \''.$separator.'\' || ');
|
||||
}
|
||||
|
||||
function pwg_db_cast_to_text($string)
|
||||
|
|
|
@ -449,14 +449,12 @@ WHERE tablename like \''.$prefixeTable.'%\'';
|
|||
|
||||
function pwg_db_concat($array)
|
||||
{
|
||||
$string = implode($array, ',');
|
||||
return 'ARRAY_TO_STRING(ARRAY['.$string.'])';
|
||||
return implode($array, ' || ');
|
||||
}
|
||||
|
||||
function pwg_db_concat_ws($array, $separator)
|
||||
{
|
||||
$string = implode($array, ',');
|
||||
return 'ARRAY_TO_STRING(ARRAY['.$string.'],\''.$separator.'\')';
|
||||
return implode($array, ' || \''.$separator.'\' || ');
|
||||
}
|
||||
|
||||
function pwg_db_cast_to_text($string)
|
||||
|
|
|
@ -425,9 +425,7 @@ function pwg_db_concat($array)
|
|||
|
||||
function pwg_db_concat_ws($array, $separator)
|
||||
{
|
||||
$glue = sprintf(' || \'%s\' || ', $separator);
|
||||
|
||||
return implode($array, $glue);
|
||||
return implode($array, ' || \''.$separator.'\' || ');
|
||||
}
|
||||
|
||||
function pwg_db_cast_to_text($string)
|
||||
|
|
Loading…
Add table
Reference in a new issue