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

Links

When sharing links with other users we need to at least store the URL itself. We could also store a brief description of the link or even an image from the site. If we wished, we could automatically populate this information from the link. However, for the moment, we will stick to just storing the link and a brief description of it.

Database

Our video statuses table requires three fields: an ID, the URL of the link, and the name or description of the link.

Field

Type

Description

ID

Integer, Primary key

To relate to the main statuses table

URL

Varchar

The link itself

Description

Varchar

Description of the link

Model

As with the video and image types, we require a simple model to extend our statuses model (models/videostatus.php). ...

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