I remember from a different D6 case that doubles quotes are not allowed:

Wrong:

$count_sql = 'SELECT COUNT(DISTINCT t.sid) translation_count, r.pid, t.is_suggestion FROM {l10n_community_release} r INNER JOIN {l10n_community_file} f ON r.rid = f.rid INNER JOIN {l10n_community_line} l ON f.fid = l.fid INNER JOIN {l10n_community_string} s ON l.sid = s.sid LEFT JOIN {l10n_community_translation} t ON s.sid = t.sid WHERE t.is_active = 1 AND t.translation != "" ';

Good:

$count_sql = "SELECT COUNT(DISTINCT t.sid) translation_count, r.pid, t.is_suggestion FROM {l10n_community_release} r INNER JOIN {l10n_community_file} f ON r.rid = f.rid INNER JOIN {l10n_community_line} l ON f.fid = l.fid INNER JOIN {l10n_community_string} s ON l.sid = s.sid LEFT JOIN {l10n_community_translation} t ON s.sid = t.sid WHERE t.is_active = 1 AND t.translation != ''";

There could be much more bugs like this... i only saw this while it was 3 lines away from a different bug and therefor on my screen.

Comments

hass’s picture

Oh well... there is much more stuff like this...

gábor hojtsy’s picture

There are MySQL only constructs used in the module anyway. Drupal.org will run this on MySQL. Feel free to submit patches to make this run on postgresql though.

gábor hojtsy’s picture

Status: Active » Fixed

Well, after all, I looked through all the queries I found, and only identified three SELECT queries which were affected. Now fixed those.

gábor hojtsy’s picture

Status: Fixed » Closed (fixed)