Hi,
I had some problem to make this module run with Postgres 7.4
It seems the version of Postgres that I'm using is not possible to use double quotes (") in the queries to specify a language.
with the original code, for example...
languageinterface.module
...
(195) $defaulttext = db_result(db_query('SELECT native FROM {languages} WHERE language = "%s"', $lang));
...
It was giving some warnings...
# warning: pg_query(): Query failed: ERROR: column "en" does not exist in c:\...\includes\database.pgsql.inc on line 139.
# user warning: query: SELECT native FROM languages WHERE language = "en" in c:\...\sites\all\modules\languageinterface\languageinterface.module on line 195.
Changing the double quotes for simple quotes might solve the problem (at least for me)
languageinterface.module
...
(195) $defaulttext = db_result(db_query('SELECT native FROM {languages} WHERE language = \'%s\'', $lang));
...
hope it helps someone :)
Comments
Comment #1
PixelClever commentedComment #3
testosterone_z commentedThe MySQL-specific SQL statements still persist in Version 6.x-2.3.
In file "languageinterface.module", lines 344, 351 and 442. "%s" should get replaced by \'%s\' (escaped single quotes) or the statements should get wrapped with double quotes and the %s with single quotes.
Thanks in advance.
Comment #4
testosterone_z commentedComment #5
testosterone_z commentedComment #6
jolidog commentedChanged the lines indicated by testosterone_z to statements wrapped with double quotes and the %s with single quotes.
I can't test this with Postgres, so someone who can, please report back.
Thanks