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
Comment | File | Size | Author |
---|---|---|---|
viewsphpfilter_cbd-2011-05-17.patch | 6.2 KB | sdsheridan | |
screenshot.png | 34.97 KB | sdsheridan |
Comments
Comment #3
gnassar CreditAttribution: gnassar commentedThis 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.
Comment #4
kenorb CreditAttribution: kenorb commentedComment #5
eaglegamma CreditAttribution: eaglegamma as a volunteer commentedDid this just disappear? Any way to refer to URL in Views Raw SQL?