[erlang-questions] How to select a record with an attribute which is maximal in mnesia table?

Bengt Kleberg bengt.kleberg@REDACTED
Wed Apr 14 15:22:08 CEST 2010


Greetings,

Would it be ok for you to have the date/time as record key? If you have
that and an ordered_set then the last record is just that, last.


bengt

On Wed, 2010-04-14 at 11:34 +0200, 钱晓明 wrote:
> Hi, I want to select a record with an attribute which is maximal from mnesia
> table, so should I use qlc?
> For example, I have to insert a record into a table every 5 minutes, and
> when my program start up, it should read the last record to get some
> information.
> So how can I achieve this?
> 
> Thanks!



More information about the erlang-questions mailing list