CSDN Blog系统升级通知

亲爱的CSDN用户大大们:

为提升服务,CSDN Blog将于今晚进行系统升级,升级期间存在下面问题:

  1. 无法进入“写博客 ” 页面

  2. 升级期间不支持保存草稿或发布博文

  3. 升级前已打开写博客页面并写了博文但未保存的,在升级期间不支持保存

升级时间:2019年10月31日0:00 ~ 6:00

请您务必在10月30日12点前保存已写完或正在写的博文,避免内容丢失。

再次恳请用户大大们,可以谅解此次操作带来的不便~有需要随时联系网站QQ客服:800108106

<div class="post-text" itemprop="text"> <p>Okay so I am using PHP MySQL .<br> I Want to Implement a Notification System For A Social Networking Site<br> Currently I have 2 Tables one For Posts containing columns</p> <ol> <li><ol> <li>id //id of the post</li> </ol></li> <li><ol start="2"> <li>body//</li> </ol></li> <li><ol start="3"> <li>status // For Notifications</li> </ol></li> <li><ol start="4"> <li>user_id// id of the user </li> </ol></li> </ol> <p>Whenever a preson comments or likes a particular post, 1 New record is inserted in the Notification table.<br> Notification Table Has the following columns<br> </p> <ol> <li>id// id of the notification</li> <li>src_id // id of the post on which the user commented</li> <li>type// like , comment etc</li> <li>user_id //id of the user</li> </ol> <p>So what the problem is that I want to fetch data from notifications table for which the user needs to be notified. </p> <hr> <p>For Example Mysql Query is</p> <pre><code>SELECT * FROM notifications WHERE src_id IN ("244","245","249") order by src_id </code></pre> <p>For example I have some data like this in the notifications table</p> <pre><code> id type user_id src_id 1 like 6 244 2 comment 4 244 3 like 1 249 4 comment 8 249 5 comment 9 245 6 comment 3 244 7 like 12 244 </code></pre> <p>How Do i display it in php by grouping them by their src_id</p> <p>So that I can generate something like this</p> <blockquote> <p>4,3 commented on your post 244<br> 12,6 liked your post 244<br> 1 liked your post 249<br> 8 commented on your post 249 <br></p> </blockquote> <p><em>where <code>4,3,12,6,1,8</code> are user_ids</em></p> </div>
©️2020 CSDN 皮肤主题: 终极编程指南 设计师:CSDN官方博客 返回首页