Ignore:
Timestamp:
Jun 9, 2010, 10:25:03 PM (14 years ago)
Author:
nikrou
Message:

Fix bug 1722 : PosgtreSQL wants all fields in select to be in Group by clause
or agregate function
Fix issue for lambda function (incorrect number of params)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/dblayer/functions_pgsql.inc.php

    r6339 r6510  
    315315      }
    316316    } // foreach update
    317   } // if mysql_ver or count<X
     317  }
    318318  else
    319319  {
     
    327327    mass_inserts($temporary_tablename, $all_fields, $datas);
    328328    if ( $flags & MASS_UPDATES_SKIP_EMPTY )
    329       $func_set = create_function('$s, $t', 'return "$s = IFNULL(t2.$s, '.$tablename.'.$s)";');
     329      $func_set = create_function('$s', 'return "$s = NULLIF(t2.$s, '.$tablename.'.$s)";');
    330330    else
    331331      $func_set = create_function('$s', 'return "$s = t2.$s";');
     
    344344        "\n    AND ",
    345345        array_map(
    346           create_function('$s, $t', 'return "'.$tablename.'.$s = t2.$s";'),
     346          create_function('$s', 'return "'.$tablename.'.$s = t2.$s";'),
    347347          $dbfields['primary']
    348348          )
     
    586586
    587587// my_error returns (or send to standard output) the message concerning the
    588 // error occured for the last mysql query.
     588// error occured for the last pgsql query.
    589589function my_error($header, $die)
    590590{
Note: See TracChangeset for help on using the changeset viewer.