O'Reilly logo

PHP 5 Social Networking by Michael Peacock

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Statuses

If we assume for the moment that statuses are not the only things we would want to display on our users profiles, this can help us plan out this feature more appropriately.

Because of this, we would want to have a single database table that keeps a central record of all the different types of content, and the profiles it relates to.

Statuses database table

Below is a suitable structure for the statuses database table.

Field

Type

Description

ID

Integer, Primary Key, Auto-increment

ID of the status

Update

Longtext

The content of the update

Type

Integer

Reference to the status types table

Creator

Integer

The ID of the poster

Created

Timestamp

Time status was posted

Profile

Integer

Profile the status was posted on

Approved ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required