i'm starting laravel (4.2) , filter table's rows column unix timestamp. need timestamp in (date) range.
i imagine like:
$objs = db::table('[table name]')->where('timestamp', [condition])->get(); i'm using mongodb 2.2.3.
what you're looking wherebetween.
$range = [timestamp1, timestamp2]; ->wherebetween('timestamp', $range); also note methods on query builder support closure:
->wherebetween('timestamp', function($q){ //some logic return [timestamp1, timestamp2]; });
Comments
Post a Comment