php 点关注_php 关注/粉丝 每增加一个粉丝就有一个提示

本帖最后由 u012376806 于 2013-10-13 19:17:32 编辑 目前实现关注是 单独一个表 结构如下

gzid userid followuserid remark in_time

gzid自增

userid 关注人id

followuserid 被关注人id

remark 备注

in_time 关注时间

如何实现 被关注后 提示增加n个粉丝呢

还有就是如何防止 用户不停的对一个用户关注和取消关注

回复讨论(解决方案)

1.被关注后 提示 是提示宿主?新数据减去某个时间段的数据 输出差额

2.一段时间内的时间戳判断操作是否允许

关注和取消关注前进行判断。

1.被关注后 提示 是提示宿主?新数据减去某个时间段的数据 输出差额

2.一段时间内的时间戳判断操作是否允许

mysql查询30分钟前的数据要怎么写查询语句啊 unix时间戳

查询当前id是1的粉丝个数

select count(*) as totalb from pd_attentions where followuserid='1'

查询30分钟前 id是1的粉丝个数

select count(*) as totalb from pd_attentions where followuserid='1' in_time??????

select count(*) as totalb from pd_attentions where followuserid='1' and in_time

本文原创发布php中文网,转载请注明出处,感谢您的尊重!

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
好的,我会给你提供一个简单的网站设计方案,包含首页、动漫、游戏和音乐四个页面。 1. 首页设计 首页包含登录和注册表单,以及导航栏,用户可以通过导航栏选择其他页面。 ```html <!DOCTYPE html> <html> <head> <title>首页</title> <meta charset="UTF-8"> <style> nav { background-color: #333; color: white; overflow: hidden; } nav a { float: left; display: block; color: white; text-align: center; padding: 14px 16px; text-decoration: none; } nav a:hover { background-color: #ddd; color: black; } form { margin: 50px auto; width: 50%; padding: 20px; border: 1px solid #ccc; border-radius: 5px; box-shadow: 0 0 10px #ccc; background-color: #fff; text-align: center; } form input[type="text"], form input[type="password"], form input[type="email"] { width: 100%; padding: 10px; margin: 10px 0; border-radius: 5px; border: 1px solid #ccc; box-sizing: border-box; } form input[type="submit"] { background-color: #4CAF50; color: white; padding: 10px 20px; border: none; border-radius: 5px; cursor: pointer; font-size: 16px; } form input[type="submit"]:hover { background-color: #3e8e41; } </style> </head> <body> <nav> <a href="#">动漫</a> <a href="#">游戏</a> <a href="#">音乐</a> </nav> <form action="login.php" method="post"> <h1>用户登录</h1> <label for="username">用户名:</label> <input type="text" name="username" id="username"><br> <label for="password">密码:</label> <input type="password" name="password" id="password"><br> <input type="submit" value="登录"> </form> <form action="register.php" method="post"> <h1>用户注册</h1> <label for="username">用户名:</label> <input type="text" name="username" id="username"><br> <label for="password">密码:</label> <input type="password" name="password" id="password"><br> <label for="confirm_password">确认密码:</label> <input type="password" name="confirm_password" id="confirm_password"><br> <label for="email">邮箱:</label> <input type="email" name="email" id="email"><br> <input type="submit" value="注册"> </form> </body> </html> ``` 2. 动漫页面设计 动漫页面包含一些动漫图片和简介,以及返回首页的链接。 ```html <!DOCTYPE html> <html> <head> <title>动漫</title> <meta charset="UTF-8"> <style> h1 { text-align: center; } img { display: block; margin: 20px auto; max-width: 100%; height: auto; } p { text-align: center; } a { display: block; text-align: center; margin: 20px; } </style> </head> <body> <h1>动漫页面</h1> <img src="images/anime1.jpg" alt="动漫图片"> <p>这是一部非常好看的动漫,故事情节非常精彩。</p> <img src="images/anime2.jpg" alt="动漫图片"> <p>这是另一部非常火热的动漫,人物形象设计非常精美。</p> <a href="index.html">返回首页</a> </body> </html> ``` 3. 游戏页面设计 游戏页面包含一些游戏截图和简介,以及返回首页的链接。 ```html <!DOCTYPE html> <html> <head> <title>游戏</title> <meta charset="UTF-8"> <style> h1 { text-align: center; } img { display: block; margin: 20px auto; max-width: 100%; height: auto; } p { text-align: center; } a { display: block; text-align: center; margin: 20px; } </style> </head> <body> <h1>游戏页面</h1> <img src="images/game1.jpg" alt="游戏截图"> <p>这是一款非常好玩的游戏,玩家可以在游戏中体验很多不同的挑战。</p> <img src="images/game2.jpg" alt="游戏截图"> <p>这是另一款非常火热的游戏,拥有非常多的玩家和粉丝。</p> <a href="index.html">返回首页</a> </body> </html> ``` 4. 音乐页面设计 音乐页面包含一些音乐播放器和歌曲介绍,以及返回首页的链接。 ```html <!DOCTYPE html> <html> <head> <title>音乐</title> <meta charset="UTF-8"> <style> h1 { text-align: center; } audio { display: block; margin: 20px auto; max-width: 100%; } p { text-align: center; } a { display: block; text-align: center; margin: 20px; } </style> </head> <body> <h1>音乐页面</h1> <audio controls> <source src="music/song1.mp3" type="audio/mpeg"> Your browser does not support the audio element. </audio> <p>这是一首非常好听的歌曲,歌手唱功非常出色。</p> <audio controls> <source src="music/song2.mp3" type="audio/mpeg"> Your browser does not support the audio element. </audio> <p>这是另一首非常流行的歌曲,歌曲编曲非常精彩。</p> <a href="index.html">返回首页</a> </body> </html> ``` 以上是一个简单的网站设计方案,你可以根据自己的需求进行修改和完善。同时需要注意的是,为了保证网站的安全性和用户体验,需要对用户输入进行验证和过滤,并且需要选择安全可靠的服务器和数据库进行部署。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值