Is that any method to update the mySQL database file with inserting a record which is needed to sort with the original record ?? Or, do I need to extract the original records out to an array and merge the new record to this array, then update the database file with this merged array with sorting ?? Thanks.
It sounds like you are relying on keeping the table sorted through the sequence in which records are added to the table.
Instead of this, why not use the ORDER BY clause to do your sort in the SELECT statement when you are reading the records?
t