faqts : Computers : Programming : Languages : PHP

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

4 of 12 people (33%) answered Yes
Recently 3 of 10 people (30%) answered Yes

Entry

How do i save php output sequentially by date so that i may move forwards and backwards in order by date of creation "next/previous etc"

Feb 22nd, 2008 03:18
dman, Martijn Spruit, Norton Seron, http://www.ttnr.org


I am using a MySQL database: in every table I've made a field 
named 'timestamp' (INT, 12, NOT NULL) in wich I insert the Unix-
timestamp (eq. $today=time() ; ) every time the table is updated. 
When retrieving data you can simply use ORDER BY table.timestamp to get 
the data in the right sequence.
(I can't show you examples 'cause it was made for commercial use in an 
intranet-application, sorry.)