Dharmalingam Arumugam
Dharmalingam Arumugam

Reputation: 407

How to filter by date in sphinx?

I have a column as 'created_date' in the Database Table.

I am trying to select the record based on between two date as 'start-date' and 'end-date'

How can I write query as bellow in sphinx

SELECT * FROM table where created_date BETWEEN "2001-01-05" AND "2001-01-10"

Upvotes: 1

Views: 2838

Answers (1)

metalfight - user868766
metalfight - user868766

Reputation: 2750

You can use setfilterrange

$cl->SetFilterRange ( $attribute, $min, $max, $exclude=false )

Here $cl is object of sphinx class, $min & max is your date range.

Hope this help !

Upvotes: 1

Related Questions