[FX.php List] Last N Records

Gjermund Gusland Thorsen ggt667 at gmail.com
Mon Aug 25 07:25:28 MDT 2008


I am sure you have an auto increment or you can make autoenter
calculation by get(recid)?

I would sort descending by that autoincremented number and have the
number of records returned set to N

Gjermund

2008/8/25 Jonathan Schwartz <jschwartz at exit445.com>:
> Looking at my Log file...on an iphone. Just want to see the last 10 records
> or so.
>
> Don't want to return the whole file (100,000+ records and growing) and sort
> descending just to see the last 10 records.
>
> See what I mean?
>
> Now, you might say...just query "TODAY" and then sort.
>
> But..what it it wasn't a log file where you could predict the last records
> fell under a single day?
>
> Still need a way to grab just the last N records with no other criteria
> needed
>
>
> Jonathan
>
>
> At 1:26 PM +0200 8/25/08, Gjermund Gusland Thorsen wrote:
>>
>> Ehh, what are you doing?
>>
>> the last N records of a table?
>>
>> how about sort descending, and change return amount to N?
>>
>> ggt
>>
>>
>> 2008/8/25 Jonathan Schwartz <jschwartz at exit445.com>:
>>>
>>>  Hi Folks,
>>>
>>>  Looking to query and return just the last N records of a table.
>>>
>>>  I thought of using two queries: the first to get record count and the
>>> second
>>>  to use the skip parameter.
>>>
>>>  Is there a single query method?
>>>
>>>
>>>  J
>>>  --
>>>  Jonathan Schwartz
>>>  Exit 445 Group
>>>  jonathan at exit445.com
>>>  http://www.exit445.com
>>>  415-370-5011
>>>  _______________________________________________
>>>  FX.php_List mailing list
>>>  FX.php_List at mail.iviking.org
>>>  http://www.iviking.org/mailman/listinfo/fx.php_list
>>>
>> _______________________________________________
>> FX.php_List mailing list
>> FX.php_List at mail.iviking.org
>> http://www.iviking.org/mailman/listinfo/fx.php_list
>
>
> --
> Jonathan Schwartz
> Exit 445 Group
> jonathan at exit445.com
> http://www.exit445.com
> 415-370-5011
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list
>


More information about the FX.php_List mailing list