erlang - Mnesia - Check for a value in either of the keys in the table -


i have mnesia table "users" created following record

-record(users,{username,nickname,age}) 

let's have mnesia table following records

users | username | nickname | age  users | john     | baddy    | 25   users | monk     | john     | 26 

i have name match table...(say "john")..i want select or match rows has "john" either username or nickname...how can achieve this? if can suggest me way, happy...

thanks

have @ qlc - there's simple example here on learn erlang, or man page here. can use booleans match e.g. (in pseudocode) (username == john or nickname == john).


Comments

Popular posts from this blog

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

Android Gson.fromJson error -