[erlang-questions] Mnesia Dirty select -> use of "or" in guards

Manoj Raj rajmanoj.bottle@REDACTED
Sat May 25 13:50:26 CEST 2013


I have the following record schema saved in the table(eg)


I want to select the hobby from the mnesia table when the status is
"public" or "universal"

I have written the following query for testing

#details{ user= "manoj", _ = '_', hobby = '$1', status='$2' },
[{'==', '$2', "public"}],

It works fine...How should i add orelse inside the guard sequence...I want
to check whether status is equal to "public" or "universal"...

Is there a way or should i go the qlc way?

Thank you
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20130525/2e721630/attachment.htm>

More information about the erlang-questions mailing list