Bug 1737 fixed : Concatenation error with POstgreSQL

Simplify same function for SQLite

git-svn-id: http://piwigo.org/svn/trunk@6580 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
nikrou
2010-06-22 21:18:42 +00:00
parent 5a677f1151
commit bedacf7b08
3 changed files with 4 additions and 10 deletions
+2 -4
View File
@@ -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)