[erlang-questions] mnesia:select returning wrong number of columns

Tiago Cury tcury@REDACTED
Sat Jun 15 23:21:45 CEST 2013


I missed []. The correct line is:

F = fun() -> User = #user{_='$1',name='$2',password='$3'},mnesia:select(user, [{User, [], [['$1','$2','$3']]}]) end.

On Jun 15, 2013, at 4:27 PM, Tiago Cury <tcury@REDACTED> wrote:

> -record(user, {id, name, password}).
> 
> F = fun() -> User = #user{_ = '$1', name= '$2', password= '$3'}, mnesia:select(user, [{User, [], ['$1','$2','$3']}]) end.
> mnesia:transaction(F).
> 
> {atomic,["admin"]}
> 
> Why is it returning just one column other than three ($1,$2,$3) ?
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions




More information about the erlang-questions mailing list