Using SET in INSERT SQL queries is not SQL ANSII compliant. PostgreSQL spits out lots of

warning: pg_query() [function.pg-query]: Query failed: ERROR: syntax error at or near "SET" LINE 1: INSERT INTO moderation_moderation SET obj_type='node', obj_i... ^ in .....

yuck.

Comments

josh waihi’s picture

here's what you should have:

db_query("INSERT INTO {moderation_moderation} (obj_type, obj_id, status) ('%s', %d, %d)", $obj_type, $row->id, $moderated);
josh waihi’s picture

Assigned: Unassigned » josh waihi
Status: Active » Needs review
StatusFileSize
new3.64 KB

here's a patch to fix the whole module.

josh waihi’s picture

StatusFileSize
new3.65 KB

actually, that last patch is bung, try this one.

sanduhrs’s picture

Version: 6.x-1.3 » 6.x-1.x-dev
Status: Needs review » Fixed

Commited to d5-dev,d6-dev.
Thank you!

Status: Fixed » Closed (fixed)

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