Using a json like this:
[
{
"id": 1,
"from": "12/24/2024",
"to": "12/25/2024",
"prior": 7,
"isAllDay": true,
"title": "Closed for Christmas",
"description": "This is a description of the event that has been added,.",
"location": "Uptown",
"group": "Group 1",
"type": 1,
"customTags": {
"closed": true
}
}
...
]
I am trying to select all of the current or future entries where the "from" date column is equal to a given date or greater than a given date, but I don't see a method for that in the where function. I need something like this:
$events = $json_db->select( '*' )
->from( $fileName )
->where( [ 'from' == $date, 'from' > $date ], 'OR' )
->get();
I tried something like this but it did not work:
->where(function($row) {
return $row['from'] >= $date;
})
Any methodology for that or do I need to code that myself?