Skip to content

Instantly share code, notes, and snippets.

@hiyosi
Created September 23, 2011 14:07
Show Gist options
  • Save hiyosi/1237423 to your computer and use it in GitHub Desktop.
Save hiyosi/1237423 to your computer and use it in GitHub Desktop.
qlcでdatetime型の検索
%% http_resultテーブルから結果を取得
%% 取得範囲はdatetime型でFromからToを指定
select_check(Id, From, To) ->
do(qlc:q([X#http_result.status || X <- mnesia:table(http_result),
X#http_result.list_id =:= Id,
X#http_result.mon_time < To,
X#http_result.mon_time > From])).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment