<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br></div><div>Try [ {'or', {'==', '$2', "public"}, {'==', '$2', "universal"}} ]</div><div><br></div><div>BR,</div><div>Ulf W</div><br><div><div>On 25 May 2013, at 13:50, Manoj Raj wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr"><div><div><div><div><div>Hi,<br><br>I have the following record schema saved in the table(eg)<br><br></div>-record(details,{user,age,hobby,status}).<br><br></div>I want to select the hobby from the mnesia table when the status is "public" or "universal"<br>
<br></div>I have written the following query for testing<br><br></div>mnesia:dirty_select(details,<br>[<br>{<br>#details{ user= "manoj", _ = '_', hobby = '$1', status='$2' },<br></div>[{'==', '$2', "public"}],<br>
<div>['$1']<br>}<br>]).<br><br></div><div>It works fine...How should i add orelse inside the guard sequence...I want to check whether status is equal to "public" or "universal"...<br><br></div>
<div>Is there a way or should i go the qlc way?<br><br>Thank you<br></div></div>
_______________________________________________<br>erlang-questions mailing list<br><a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>http://erlang.org/mailman/listinfo/erlang-questions<br></blockquote></div><br><div apple-content-edited="true">
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div><div>Ulf Wiger, Co-founder & Developer Advocate, Feuerlabs Inc.</div><div><a href="http://feuerlabs.com">http://feuerlabs.com</a></div></div><div><br></div></span><br class="Apple-interchange-newline">
</div>
<br></body></html>