Q:

Display all records with a certain element in lists

How to use lists:member(User,users) in the match_object command?? 
I have several records in which "users" is a list contain different users , i want to display the records which contain a certain user .
find(User) ->
mnesia:transaction(fun () -> 
 case mnesia:match_object(#updt{**users==[User]**, _='_'}) of
    [Y] ->io:format("Records found for the user : ~p~n", [Y]);
    [] ->  io:format("No group found with the user : ~p ~n",[User])
end
end).`

A:

You don't have to use match_object. I have answered a similar question:
[answered question][1] https://stackoverflow.com/a/28762454/
Basically you can query the database like you would with a SQL DB using the method i specified in the answered question. You can use lists:member/2 to find matches.

