Gossamer Forum
Home : Products : DBMan : Installation :

How to put the new entry on the first line ?

Quote Reply
How to put the new entry on the first line ?
Hello every body !
I would like to know how I can do to put the new registering on the first line of the default.db file and not a the end !
For Exemple, if I post a new entry with the ID's Number at 10, I don't want it to register at line ten but on the first line !
Do you understand ???

Help Please

DOC
Quote Reply
Re: How to put the new entry on the first line ? In reply to
I don't understand why you want to do that, but I suppose it could be done. You'd need to load the file into a variable, and have your new record already in the format (using &join_encode). Then put the two together, using $output = $new_record . $old_database (of course, these aren't really names of variables. They're just for illustration.)

Then save the $output variable as the database file name.



------------------
JPD