PHP Message table Design

Source: Internet
Author: User
PHP has a page is sent message click Send, I will be the public number like the designated attention to change the public number of people to send information, such as the boss like employees to send a notice, employees open, accepted. Boss side can know has read, this database how to design

Reply content:

PHP has a page is sent message click Send, I will be the public number like the designated attention to change the public number of people to send information, such as the boss like employees to send a notice, employees open, accepted. Boss side can know has read, this database how to design

field (numeric) ID message show Showid
Pay attention to the Cartesian product

The point of this question is not how to design the table, when you ask the table how to design when I guess you may have just come into contact with this piece of development, there are a lot of questions waiting for you.
Just consider the table, you can do a message table to store messages, and then do a user read the message table to store whether the user has read the state.

Is there an API that provides "read messages already"? If not, you're not going to make it.

There is a limit to the group, in addition to specify the sending of the other party must have triggered a reply message can be adjusted to the event. Read the development documentation for the public number in detail.

The process is when the user opens the link to be read, the server uses the user's OpenID to find the user information and sends the template information to the Boss's OpenID (template information interface: http://mp.weixin.qq.com/wiki/5/ 6dde9eaa909f83354e0094dc3ad99e05.html). If you want to record a specific action, you can define a status field in the notification table (0 No 1 read 2 pushed) to follow up on notifications

There is a switch in the background, the location information is uploaded every 5 seconds after entering the chat interface.
Can not be so perfect to implement the "have read the message."

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.