SELECT *
FROM `products`
ORDER BY `position` DESC, `id` ASC
LIMIT 800 , 38
Не хотелось бы зависеть от стороннего сервиса
UPDATE `table` SET `updated` = 0 WHERE `user_id` = $uid
INSERT INTO `table` (`user_id`, `obj_id`, `updated`) VALUES ($uid, $oid, 1)
ON DUPLICATE KEY UPDATE `updated` = 1
DELETE FROM `table` WHERE `user_id` = $uid AND `updated` = 0
SELECT DATEDIFF('2014-01-01','2013-12-31');
(function(window) {
var videoNode = window.document.querySelector('#myvideo');
var timeNode = window.document.querySelector('.time');
videoNode.addEventListener('loadedmetadata', function(e) {
var duration = videoNode.duration.toFixed(1);
var m = duration % 60;
timeNode.innerText = Math.floor(duration / 60) + ':' + (m < 10 ? '0' : '') + m;
});
})(window);