修改文档浏览(点击)次数的三种方法
演示地址: http://led.00137.net/news/show/771/方法一:使用sql命令直接将数据库里的点击次数的字段的值改为另外一个值
使用以下SQL命令:
update destoon_sell set hits=100
方法二:使用sql命令直接将数据库里的点击次数的字段的值加上另外一个值
使用以下SQL命令:
update destoon_sell set hits=hits+100
方法三:使用sql命令将数据库里的点击次数的字段的值修改为在一个范围里变化的随机数
update destoon_sell set hits=hits+FLOOR(10 +(RAND() * 50)) where adddate="2010-9-14"
说明:FLOOR(10 +(RAND() * 50))是取10至50间的随机数
adddate="2010-9-14" 是修改添加日期为 2010-9-14日的SELL 数据
推荐使用第三种方法,让你的文章或供应文档的点击量更加有真实感。。。
文章来源:阅微草堂
链接地址:http://blog.100-tea.com/j/20100914198.html
[ 本帖最后由 100tea 于 2010-9-14 15:01 编辑 ]
这些方法估计一直是论坛里的很多人想要的。。。。
http://bbs.destoon.com/static/image/smiley/default/lol.gif
http://bbs.destoon.com/static/image/smiley/default/lol.gif
http://bbs.destoon.com/static/image/smiley/default/lol.gif
http://bbs.destoon.com/static/image/smiley/default/lol.gif
http://bbs.destoon.com/static/image/smiley/default/lol.gif
http://bbs.destoon.com/static/image/smiley/default/lol.gif
没有人要用么
修改下:
update destoon_sell set hits=hits+FLOOR(10 +(RAND() * 50)) where addtime="2010-9-14"
页:
[1]