In this section, we will learn:
How to build a comment system
How to join data stored in two different tables
How to format dates
The system as it is currently built can be improved. This can be done by building a comment feature so that a user can log activity against a contact.
They may want to note that they called the contact on Monday and was asked to call them again on Friday. Users may be working together to call a list of contacts, and it would be useful to know who made that comment and when.
Another way the system can be improved is ensuring that the dates and times are displayed in an easy-to-read format. The database table stores such information in a way that is not so human-friendly.
When creating comments, it is essential to create joins
. There is almost an unlimited amount of comments that a user can post against a contact.
It would be impossible to cater for this when building the contacts field, and the comments would have to be limited. There...