1. date
  2. selector
  3. No timezone conversion

This is the error message:

user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''T',' ') < NOW()) ORDER BY node_data_field_when_field_when_value ASC' at line 1 query: SELECT DISTINCT(node.nid), node_data_field_when.field_when_value AS node_data_field_when_field_when_value, node.title AS node_title, node.changed AS node_changed, node_data_field_where.field_where_value AS node_data_field_where_field_where_value, node_data_field_when.field_when_value2 AS node_data_field_when_field_when_value2 FROM node node LEFT JOIN node_data_field_when node_data_field_when ON node.vid = node_data_field_when.vid LEFT JOIN node_content_conference node_data_field_where ON node.vid = node_data_field_where.vid WHERE (node.type IN ('content_conference')) AND ( REPLACE(node_data_field_when.,'T',' ') < NOW()) ORDER BY node_data_field_when_field_when_value ASC in c:\Inetpub\wwwroot\website\includes\database.mysql.inc on line 120

It's almost certain not a 'views' bug because when I use node.created together with 'now' everything works fine. This is the error part in the SQL:

REPLACE(node_data_field_when.,'T',' ')

The name of the field is missing after the dot.

  • Drupal version: 4.7.x
  • CCK version: 1.4
  • Views version: 1.5

Comments

Stol’s picture

Title: SQL Syntax error when using a date field together with 'now' as value in filter setting of a view » This could be a views.module bug
Assigned: Unassigned » Stol

I figured out that when I manually correct the query in the view_view table things are working again. But I don't know yet which module is responsible for the error in the query. So I'll try to find it out and report it asap.

Stol’s picture

Title: This could be a views.module bug » SQL Syntax error when using a date field together with 'now' as value in filter setting of a view
Stol’s picture

Status: Active » Closed (duplicate)