The {} symbols should only be wrapped around table names, not fieldnames.
So for example:

SELECT nid FROM {node}

instead of

SELECT {nid} FROM {node}

Otherwise the query becomes SELECT prefix_nid FROM prefix_node, and the field prefix_nid doesn't exist obviously...

Comments

svendecabooter’s picture

This also applies to the WHERE clauses etc...
where {type} = '%s' should be where type = '%s'

Anonymous’s picture

Status: Active » Closed (fixed)

Fixed, thanks.