Download & Extend

Add all groups doesn't work in postgres (patch attached)

Project:OG Contact
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)
Issue tags:PostgreSQL

Issue Summary

You need to use 's to quote in queries instead of "s or the query won't work in postgres. Also %d's don't need to be quoted.

- db_query('INSERT INTO {og_contact} (gid, reply, notpublic) VALUES ("%d","%s", "%d")', $gid->nid, "", $notpublic);
+ db_query("INSERT INTO {og_contact} (gid, reply, notpublic) VALUES (%d,'%s', %d)", $gid->nid, "", $notpublic);

AttachmentSize
og_contact-add_all_groups-sql_fix.patch1.81 KB

Comments

#1

Status:active» reviewed & tested by the community

Thanks for the patch. It patches cleanly, and doesn't seem to break anything.

I took a quick look over all the calls to db_query(), and those seem to be the only offending lines.

Leaving this issue open until I commit the change.

#2

Status:reviewed & tested by the community» fixed

Should be fixed in the 6.x dev version dated later than: 2009-Oct-16. Thanks again halcyonCorsair for the patch.

#3

Status:fixed» closed (fixed)

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

nobody click here