Jump to content

Elchin

Members
  • Content Count

    5
  • Joined

  • Last visited

Community Reputation

1 Neutral

About Elchin

  • Rank
    Newbie
  1. Thank you @Robin S This is working. Please explain why my variants not works and why your variant works?
  2. This not work for me. The example below returns pages that have property `date_end` and `date_end`>=$start $results = $page->children("date_end>=$start,date<$start,sort=-date,limit=12"); The example below returns pages that not have property `date_end` at all $results = $page->children("!date_end,date<$start,sort=-date,limit=12"); But I can't get this pages with this two conditions together. I don't know why but the OR condition `!date_end|date_end>=$start` didn't worked in this case. How can I use paging in this case?
  3. Hi. I want select pages where now between date and end_date or now bigger than date and end_date is empty. I have five tried variants: $start = strtotime(date('Y-m-d') . " 00:00:00"); $results = $page->children("foo=(date<$start,date_end=''),bar=(date<$start,date_end>=$start),sort=-date,limit=12"); $start = strtotime(date('Y-m-d') . " 00:00:00"); $results = $page->children("date<$start,(date_end='',date_end>=$start),sort=-date,limit=12"); $start = strtotime(date('Y-m-d') . " 00:00:00"); $results = $page->children("date_end=''|date_end>=$start,date<$start,sort=-date,limit=12"); $start = strtotime(date('Y-m-d') . " 00:00:00"); $results = $page->children("!date_end|date_end>=$start,date<$start,sort=-date,limit=12"); $start = strtotime(date('Y-m-d') . " 00:00:00"); $results = $page->children("date_end>=$start|!date_end,date<$start,sort=-date,limit=12"); All this variants not worked for me and returned zero results.
×
×
  • Create New...