While trying to output multi-value CCK date field with Views.module, I'm constantly getting an error similar to this:
warning: pg_query() [function.pg-query]: Query failed: ERROR: argument of AND must be type boolean, not type integer in /var/www/drupal-6.16/includes/database.pgsql.inc on line 139.
user warning: query: SELECT node.vid AS _vid, node_data_field_year_published.delta as _delta, node.nid AS _nid, node_data_field_year_published.field_year_published_value AS value FROM content_field_year_published node_data_field_year_published LEFT JOIN node node ON node.vid = node_data_field_year_published.vid WHERE node.vid IN (22,61,58,57,52,51,49,48,45,44,41,39,38,26,7) AND 1 ORDER BY node.nid ASC, node_data_field_year_published.delta ASC in /var/www/drupal-6.16/sites/all/modules/date/date/date_handler_field_multiple.inc on line 88.
Evidently, this is due to the fact that conditional clause in a form 'WHERE 1' is not supported in PostgreSQL.
As far as I can see the fix is to do the following replacement at line 82:
- $where = array('1');
+ $where = array('TRUE');
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | date_handler_field_multiple.inc_.patch | 870 bytes | Monty-2 |
Comments
Comment #1
maedi commentedI also experienced this issue with the above code change a suitable fix.
Comment #2
Monty-2 commentedI've had the same issue and fixed the same way.
Providing a patch.
Comment #3
damienmckennaThe Drupal 6 version of the module is no longer supported, sorry.