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.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | sequenced_newsletter_fix_orderby-1348858-1.patch | 1.14 KB | ben coleman |
Comments
Comment #1
ben coleman commentedThis patch fixes the above problem.
Comment #2
ben coleman commentedComment #3
slashrsm commentedThat was a funny one :)
Commited: http://drupalcode.org/project/sequenced_newsletter.git/commit/bb3433dcaf...
Thanks!