Welcome Guest, Not a member yet? Register   Sign In
database structure - general
#2

[eluser]jedd[/eluser]
You are right to be wary of de-normalising your database.

Stick with storing usernames in your user table, and storing user ID's in your message table.

Quote:also, anyone have any idea how to say "last post: 15 minutes ago" like in these codeigniter forums, rather than "last post: 9:30". i think the former is a lot easier on the brain...

How far have you got with this one?

A function that takes a given DATETIME stamp, and calculates the delta with current time, then gives a 'fuzzy' string back - it's just a matter of calculating what different time periods should generate what response. Possibly a large switch or a series of if/elseif's I'd imagine.


Messages In This Thread
database structure - general - by El Forum - 06-26-2009, 10:50 AM
database structure - general - by El Forum - 06-26-2009, 10:56 AM
database structure - general - by El Forum - 06-26-2009, 11:10 AM
database structure - general - by El Forum - 06-26-2009, 11:54 AM
database structure - general - by El Forum - 06-26-2009, 02:56 PM
database structure - general - by El Forum - 06-26-2009, 04:38 PM



Theme © iAndrew 2016 - Forum software by © MyBB