This code is very database-specific. Probably needs quite a bit of work to make it neutral. I'll start looking at it, but I'm not a very experienced developer, and am also not very familiar with the differences between MySQL and PostgreSQL, simply that I need this functionality for an intranet I'm managing, and we happen to be using PGSQL. If anyone has any suggestions about how to fix this, or can provide examples of database-switching code from other modules, I'd love to see it.

The functions that seem to be causing problems are 'mysql_real_escape_string' and 'mysql_fetch_object'.

CommentFileSizeAuthor
#1 pgsqlfix.patch2.57 KBrssaddict

Comments

rssaddict’s picture

Status: Active » Needs review
StatusFileSize
new2.57 KB

This turns out to be a really easy fix. Drupal provides generic alternatives to the mysql_real_escape_string and mysql_fetch_object functions, called db_escape_string and db_fetch_object, which can be substituted with no effect on the module's function. Patch attached.

jbrown’s picture

Priority: Normal » Critical
Status: Needs review » Reviewed & tested by the community

#1 also adds mysqli support - please apply

sigsby’s picture

This patch works fine for me. Gets my thumbs up.

arithmetric’s picture

Assigned: Unassigned » arithmetric
Status: Reviewed & tested by the community » Fixed

rssaddict,

Thanks for reporting this and working it out. I've fixed this in the latest version (dated 2008-October-25).

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.