
Originally Posted by
chillnc
... the query does run without error.
i am still as sceptical as before
Code:
create table chillnc
( id tinyint not null
, date integer
, event tinyint
);
insert into chillnc values
( 43, 1085106659, 1 )
,( 48, 1085167702, 0 )
,( 41, 1085027672, 0 )
,( 40, 1085027669, 1 )
,( 38, 1084416017, 0 )
,( 37, 1084415802, 0 )
;
select id
, `date`
, FROM_UNIXTIME(`date`,'%Y-%m-%d %h:%i:%s')
as humandate
, event
from chillnc
id date humandate event
43 1085106659 2004-05-20 07:30:59 1
48 1085167702 2004-05-21 12:28:22 0
41 1085027672 2004-05-19 09:34:32 0
40 1085027669 2004-05-19 09:34:29 1
38 1084416017 2004-05-12 07:40:17 0
37 1084415802 2004-05-12 07:36:42 0
select x.date as x
, y.date as y
from chillnc
where x.event = 1
and y.event = 1
order
by x.date - y.date desc
Unknown table 'x' in field list
Bookmarks