Re: Viewing the last few records in a table

2003-12-13 Thread Chris Nolan
Hi! There are plenty of funky ways to do this. :-) The easiest and fastest way would simply need an AUTO_INCREMENT column on your table. Then, you might be able to do something like this (with MIGHT being the operative word): SELECT * FROM table ORDER BY auto_inc_column DESC LIMIT 22; I've just

Re: Viewing the last few records in a table

2003-12-13 Thread Moritz von Schweinitz
AFAIK databases like mysql usually dont (and cant) guarantee that they will maintain the order of rows the same way they were inserted - it's that whole 'relational' thing, methinks. the official way would be to simply add a timestamp field (which gets filled automagically every time you insert

Viewing the last few records in a table

2003-12-13 Thread Matthew Richardson
Hello all, Still a newbie with MySQL, I am running version 4.01 and a Linux box. We are writing information into the tables at a regular rate approx 20 time per hour. with 22 rows of information. What I am trying to work out is how to read the last 22 rows of information that has been written