Issue Bug Closed

#76453CONTENT select where with operator "<="

Johannes C. Laxander 06/04/16, 10:43 updated 06/07/16, 06:39

Description

myRecords = CONTENT
myRecords {
table = mytable
select {
pidInList = 3
orderBy = datum1
selectFields = title,datum1
where = datum1 > UNIX_TIMESTAMP(“2016-06-01 00:00:00”) AND datum1 <= UNIX_TIMESTAMP(“2016-06-24 00:00:00”)
}
}

The typoscript code above doesn’t working properly.
The query should find a record which datum1 field has a value of “1466726400” (2016-06-24 00:00:00 UTC 0).
But the result is: no record found!?

Then I’ve change the second condition in the where clause from “<=” to “<” and the date from the 24th to the 25th:
where = datum1 >= UNIX_TIMESTAMP(“2016-06-24 00:00:00”) AND datum1 < UNIX_TIMESTAMP(“2016-06-25 00:00:00”)
This query find the corresponding record!

Also this query with “>=” ist working properly.
where = datum1 >= UNIX_TIMESTAMP(“2016-06-24 00:00:00”) AND datum1 < UNIX_TIMESTAMP(“2016-07-01 00:00:00”)

Why does the operator “<=” not working properly? I’ve no explanation for it.

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.