views:

18

answers:

0

Hi, I have kind of strange problem ... I have a table which stores a timestamp as integer (realdate field).

Now there are the results of selecting items younger than some date:

SELECT realdate FROM photos WHERE realdate > 1265410800

array
  0 => 
    array
      'realdate' => string '1265629201' (length=10)
      0 => string '1265629201' (length=10)
  1 => 
    array
      'realdate' => string '1265629202' (length=10)
      0 => string '1265629202' (length=10)

However the problem is when I want to select OLDER than some date items: let's say I'll use dummy date 1295583600 which is DEFINITELY bigger than at least those two selected in previous query (1295583600 - 1265629202 = 29 954 398 so it is definitely bigger ;) ) However the query

SELECT realdate FROM photos WHERE realdate < 1295583600

returns empty array...

What is wrong here?...