I’ve this query
SELECT *
FROM `t_activities`
WHERE `uid` =2
AND `del` =0
AND UNIX_TIMESTAMP( `time` ) < 1327518485
ORDER BY `id` DESC
LIMIT 4
The image below is what is returned.

The time 1327518485 is actually converted from the datetime string '2012-01-25 20:08:05' using php strtotime('2012-01-25 20:08:05').
With the query, I’m expecting to load files which were inserted prior to '2012-01-25 20:08:05' or 1327518485; but the result still has files inserted after it.
Is there something wrong with the way I handled the conditioning at the query?
You don’t need to do the timestamp conversion. You can just do:
You may have timezone issues with the timestamp.