diff -u -r drupal-6-cvs-temp/includes/database.mysqli.inc drupal-6-cvs/includes/database.mysqli.inc --- drupal-6-cvs-temp/includes/database.mysqli.inc 2009-12-09 14:30:01.000000000 -0500 +++ drupal-6-cvs/includes/database.mysqli.inc 2009-12-09 14:32:53.000000000 -0500 @@ -363,6 +363,7 @@ * @return SQL query with the DISTINCT wrapper surrounding the given table.field. */ function db_distinct_field($table, $field, $query) { + var_dump($table, $field, $query); $field_to_select = 'DISTINCT('. $table .'.'. $field .')'; $matches = array(); if (preg_match('/^SELECT(.*?)FROM(.*)/is', $query, $matches)) { @@ -373,6 +374,7 @@ return 'SELECT' . $select . 'FROM'.$matches[2]; } + var_dump($query); return $query; } diff -u -r drupal-6-cvs-temp/includes/database.mysql.inc drupal-6-cvs/includes/database.mysql.inc --- drupal-6-cvs-temp/includes/database.mysql.inc 2009-12-09 14:30:01.000000000 -0500 +++ drupal-6-cvs/includes/database.mysql.inc 2009-12-09 14:31:47.000000000 -0500 @@ -361,6 +361,7 @@ * @return SQL query with the DISTINCT wrapper surrounding the given table.field. */ function db_distinct_field($table, $field, $query) { + var_dump($table, $field, $query); $field_to_select = 'DISTINCT('. $table .'.'. $field .')'; $matches = array(); if (preg_match('/^SELECT(.*?)FROM(.*)/is', $query, $matches)) { @@ -371,6 +372,7 @@ return 'SELECT'. $select .'FROM'. $matches[2]; } + var_dump($query); return $query; }