We installed Sequenced Newsletter recently, and have been getting these error messages:

-----
pg_query() [function.pg-query]: Query failed: ERROR: argument of AND must be type boolean, not type character varying LINE 1: ...S su WHERE s.nid=n.nid and s.sid=su.snid ORDER BY mail AND d... ^ in /home/friendsofqola/public_html/includes/database.pgsql.inc on line 138.

query: SELECT sid, title, date_spooled, mail FROM sequenced_newsletter as s, node as n, simplenews_subscriptions AS su WHERE s.nid=n.nid and s.sid=su.snid ORDER BY mail AND date_spooled DESC in /home/friendsofqola/public_html/sites/all/modules/sequenced_newsletter/sequenced_newsletter.module on line 29.

-----

The problem is that line 29 uses 'ORDER BY mail AND date_spooled DESC' instead of 'ORDER BY mail, date_spooled DESC'. I'm surprised that it works on MySQL (I so far can't find use of AND in this way in the MySQL documentation). Patch to follow.

Comments

ben coleman’s picture

This patch fixes the above problem.

ben coleman’s picture

Status: Active » Needs review
slashrsm’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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