I want to list node posts so, that only those ones will display which node-updated day is not the same as node-creaded day but at least next day or newer. How to filter it in Views? I'm using Drupal 6.

1 Answer 1


I just found a solution myself. There is available ”Views PHP Filter” module for Drupal6. After installing I added new filter: ”Node: Node ID PHP handler” for my Views. I left the filter options as default but filled PHP– textarea vith code below, and it worked.

$nodeids = array();  

$result = db_query(db_rewrite_sql('SELECT DISTINCT(c.nid) FROM {node} c  WHERE c.status = 1  AND  c.changed >= c.created + 86400  - c.created % 86400  ORDER BY c.changed DESC'));

while ($node = db_fetch_object($result))  {
$nodeids[] = $node->nid; 

return $nodeids; 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.