Skip to main content
Welcome, Guest. Please login.

Login with username, password and session length
3 Guests, 0 Users

Recent

Pages: [1] 2

Compare two rows

Code: [Select]
SELECT T1.log_dt, T2.log_dt, EXTRACT(EPOCH FROM (T2.log_dt - T1.log_dt))
FROM power_data AS T1
INNER JOIN power_data AS T2
USING ( node )
WHERE T1.log_dt '2017-05-05 22:10:00'
AND T2.log_dt '2017-05-05 22:10:00'
ORDER BY T1.id, T2.id
LIMIT 2
...

Read More

1 Comment
Code: [Select]
#define ATOMIC for(INTCONbits.GIE=0;!INTCONbits.GIE;INTCONbits.GIE=1)

0 Comments
Code: [Select]
class MyClass {
public function __construct() {
echo 'I am initialized!';
}
}

$getMyClass = function() {
$myClass = new MyClass();
return $myClass;
};


Code: [Select]
$myClass = $getMyClass();
...

Read More

0 Comments
Code: [Select]
ORDER BY status ASC; will return 1,2,3,4.

Code: [Select]
ORDER BY status DESC; will return 4,3,2,1.

Code: [Select]
ORDER BY FIELD(status, 3, 2, 4, 1);
...

Read More

0 Comments
Code: [Select]
CREATE SEQUENCE teams_id_seq;
ALTER TABLE teams ALTER id SET DEFAULT nextval('teams_id_seq');
ALTER SEQUENCE teams_id_seq OWNER TO elabftw;
ALTER SEQUENCE teams_id_seq OWNED BY teams.id;
...

Read More

0 Comments
Pages: [1] 2