This module has been very helpful for me in doing some complicated filter work on views — thank you!

One thing that struck me, though, was that I was hitting the database twice to get things... once with the WHERE clause in an SQL statement like I wished I could have it in part of the underlying view, and then again once I'd retrieved list list of nodes and actually fired the view's query. So I thought, "Wouldn't it be helpful to just embed that bit of SQL into the view's WHERE clause?" So, I modified this module to be able to do that. In addition, I needed some sophistication around that in terms of supplying URL arguments and other bits to the WHERE clause, and so the accompanying patch accommodates all that too. I've included a screenshot as well, as I reckoned the documentation should be beefed up given the functionality added.

Would be great if this made it into the next version!

Shawn

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

gnassar’s picture

This has been sitting for a while, as I hadn't had time to review the code... but I can't say I don't like the idea. Biggest problem would be what to rename "Views PHP Filter" :) Maybe a separate "Views Raw SQL Filter" module would be more appropriate? Not sure yet.

kenorb’s picture

Status: Active » Needs review
eaglegamma’s picture

Issue summary: View changes

Did this just disappear? Any way to refer to URL in Views Raw SQL?