This is a migrated thread and some comments may be shown as answers.

Returning most recently added record.

0 Answers 20 Views
General Discussion
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Sam
Top achievements
Rank 1
Sam asked on 16 Sep 2013, 05:03 PM
[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');

Tags
General Discussion
Asked by
Sam
Top achievements
Rank 1
Share this question
or