06-04-2020, 07:39 PM
Maz a écrit :(updated_at IS NULL OR updated_at < NOW() - CONCAT(:hunt_speed::INT, ' minutes')::INTERVAL)
Maz a écrit :NOW() + CONCAT(:dev_duration::INT,' MINUTES ', :index_{$index}::INT * :offset::INT, ' SECONDS')::INTERVAL
Tu peux utiliser la fonction make_interval() :
Code :
SELECT NOW() - make_interval(mins := :hunt_speed) FROM ...
Code :
SELECT NOW() + make_interval(0,0,0,0,0,:dev_duration, :index_{$index} * :offset) FROM ...