Returning most recently added record.

1 posts, 0 answers
  1. Sam
    Sam avatar
    14 posts
    Member since:
    Apr 2011

    Posted 16 Sep 2013 Link to this post

    [UPDATE] Sorry Please Ignore - looks like I have  a timing issue.

    Hello, 

    I am trying to return the most recently added record to a table but I am running into an issue.
    The first time I run the query I get 0 records (Count 1), the second time I run the query I get the record I am looking for:

    var query = new Everlive.Query();
           query.where().eq('tank',gTankID);
           query.orderDesc('ActionDate');
           query.skip(1).take(1);
            
            var data = Everlive.$.data('Action');

Back to Top