I have an mysql table containg some important notes. the problem is this: SQL it's not always writing always the last entry at the end of the table, if a free "cell" is found it will write the new entry even in the middle of the table. So, is there anyway i can extract the last 5 entered data? I store the "entered date" but, i have over 300,000 entries so far... and i will just slow down the database by parsing it all again and again for the "last 5 entries" ... Here is the problem : http://postimage.org/image/taz37oc29/ see the ID? it's not always entering the data in order...
Have you somehow managed to disable auto_increment on the field? IDs shouldn't be re-used. After you've checked that, LIMIT # should work on the query.
In the structure of that table ensure id is set to AUTO INCREMENT and Primary Key, this will let ensure all new rows are in order. As for your existing ones. Could you not write a code to cache the last 5 rows and call it upon request instead of returning it directly from the database?