Filters does not produce good sql

dereine - October 20, 2009 - 18:59
Project:Views
Version:7.x-3.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

Currently the filters does not work because of not correct sql

SELECT node.nid AS nid, node.sticky AS node_sticky, node.created AS node_created FROM {node} node WHERE (( (node.promote <> 0 = :db_condition_placeholder_0) )

The current views_handler_filter_boolean_operator does not use value and operator for where(). it would be possible to do it,but
there has to be a way to add custom sql to where.

So i thought if there is no operator and no value added it should be used $query->where instead of $query->condition, here is a patch for it.
This does definitive needs review, i don't know how the where part is planned, what should be supported etc.

AttachmentSize
views-query-filter.patch740 bytes

#1

dereine - October 26, 2009 - 19:58

Updated version

AttachmentSize
filter.patch 932 bytes

#2

dereine - October 26, 2009 - 20:00

next version

AttachmentSize
filter.patch 932 bytes

#3

dereine - October 26, 2009 - 20:59

yet another version.

AttachmentSize
filter.patch 998 bytes

#4

dereine - October 26, 2009 - 21:01

Even better, i hope.

AttachmentSize
filter.patch 1 KB

#5

dereine - October 26, 2009 - 22:13
Status:needs review» fixed

Finally fixed with http://bazaar.launchpad.net/~d7cx/d7cx-views/DRUPAL-7--3/revision/220

#6

System Message - November 9, 2009 - 22:20
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.