about boss_db:find()

22 views
Skip to first unread message

王维宁

unread,
Aug 31, 2015, 8:51:27 AM8/31/15
to ChicagoBoss


Hello everyone
        First very thanks.
        I use boss_db:find(tableName,[],[]) find all record, I got me want record, but the primer-key of the record is not expect. 
        This is my databases 

database record

        This is my view

        What should I do?

chan sisowath

unread,
Sep 1, 2015, 2:18:10 AM9/1/15
to chica...@googlegroups.com
hi,

here a small solution in couple of sec.

-module(filter).
-compile(export_all).

to_int("server_list-" ++ Id ) -> list_to_integer(Id);
to_int(Id) -> Id.



erlang/OTP 18 [erts-7.0] [source] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false]

Eshell V7.0  (abort with ^G)
1> c(filter).
{ok,filter}
2> filter:to_int("server_list-33").
33
3>

cheers.
chan.






--
You received this message because you are subscribed to the Google Groups "ChicagoBoss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chicagoboss...@googlegroups.com.
Visit this group at http://groups.google.com/group/chicagoboss.
To view this discussion on the web visit https://groups.google.com/d/msgid/chicagoboss/7ae99db7-3e3c-4861-9c93-4cb15bcab6b4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages