aboutsummaryrefslogtreecommitdiffstats
path: root/include/dblayer/functions_pgsql.inc.php
diff options
context:
space:
mode:
authornikrou <nikrou@piwigo.org>2010-06-22 21:18:42 +0000
committernikrou <nikrou@piwigo.org>2010-06-22 21:18:42 +0000
commitbedacf7b0841489765286f5c61cb6a25c798e8a7 (patch)
treed47d20dadd4b829640603d3a4cc25821466c5b75 /include/dblayer/functions_pgsql.inc.php
parent5a677f1151ec726bcc147eee3e0743ca3153125e (diff)
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
Diffstat (limited to 'include/dblayer/functions_pgsql.inc.php')
-rw-r--r--include/dblayer/functions_pgsql.inc.php6
1 files changed, 2 insertions, 4 deletions
diff --git a/include/dblayer/functions_pgsql.inc.php b/include/dblayer/functions_pgsql.inc.php
index 8a300b7ad..3c68f7816 100644
--- a/include/dblayer/functions_pgsql.inc.php
+++ b/include/dblayer/functions_pgsql.inc.php
@@ -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)