Ben Virus,

The script 'Ndwex' sent above is correct. It should sort you out.

Kevin

On Fri, Sep 24, 2010 at 11:07 AM, Nd'wex Common <flexycat@gmail.com> wrote:
select * from `my_table` order by `id` desc limit 6;
assuming that id is incremental, numeric and unique

On Fri, Sep 24, 2010 at 12:53 PM, Benjamin <anangwe@gmail.com> wrote:
Hie People

I needed some assistance with some SQL logic..is their a way i can filter the last 6 records that are inputed into a database dynamically.i am using the limit command but its static unless i am wrong.

Thanks BA



_______________________________________________
Skunkworks mailing list
Skunkworks@lists.my.co.ke
http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks
------------
Skunkworks Server donations spreadsheet
http://spreadsheets.google.com/ccc?key=0AopdHkqSqKL-dHlQVTMxU1VBdU1BSWJxdy1fbjAwOUE&hl=en
------------
Skunkworks Rules
http://my.co.ke/phpbb/viewtopic.php?f=24&t=94
------------
Other services @ http://my.co.ke


_______________________________________________
Skunkworks mailing list
Skunkworks@lists.my.co.ke
http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks
------------
Skunkworks Server donations spreadsheet
http://spreadsheets.google.com/ccc?key=0AopdHkqSqKL-dHlQVTMxU1VBdU1BSWJxdy1fbjAwOUE&hl=en
------------
Skunkworks Rules
http://my.co.ke/phpbb/viewtopic.php?f=24&t=94
------------
Other services @ http://my.co.ke