Custom Fields and Filters in Views2
Posted by kswan on December 11, 2008 at 5:10pm
I have a case were I would like to add an SQL calculation to the SELECT clause of a Views2 query. For this specific case, I would like to add something like "(TO_DAYS(NOW) - TO_DAYS(field_due_date)) AS days_late". I am sure there would be other cases that would benefit from this feature as well, such as a UNIT_PRICE * QUANTITY.
I think that it would be useful for advanced site administrators to enter their custom SQL statement that would be inserted in the query. Similar functionality would apply to both Fields (SELECT clause)and Fiters (WHERE clause).
Read more