当前位置:网站首页>松鼠短视频系统为用户加入随机头像代码-快速为用户加上随机头衔
松鼠短视频系统为用户加入随机头像代码-快速为用户加上随机头衔
2022-08-02 18:40:00 【~央千澈~】
update tp_user
set head_img='图片1'
where id IN(
select A.* from(select id from tp_user where head_img='' order by rand() limit 10) AS A
);
update tp_user
set head_img='图片2'
where id IN(
select A.* from(select id from tp_user where head_img='' order by rand() limit 10) AS A
);
update tp_user
set head_img='图片3'
where id IN(
select A.* from(select id from tp_user where head_img='' order by rand() limit 10) AS A
);
以上代码执行即可,此前写了蜻蜓q系统如何随机加入头像,由于松鼠短视频字段不同因此也列一个方便大家使用。
自己使用记录:
update tp_user
set head_img='http://qingtingcun.youyacao.com/qiniu_202110270837516589514941.png'
where id IN(
select A.* from(select id from tp_user where head_img='' order by rand() limit 10) AS A
);
update tp_user
set head_img='http://qingtingcun.youyacao.com/qiniu_202110270835149436524711.png'
where id IN(
select A.* from(select id from tp_user where head_img='' order by rand() limit 10) AS A
);
update tp_user
set head_img='http://qingtingcun.youyacao.com/qiniu_202110270834429074265079.png'
where id IN(
select A.* from(select id from tp_user where head_img='' order by rand() limit 10) AS A
);
update tp_user
set head_img='http://qingtingcun.youyacao.com/qiniu_202110270836314036839413.png'
where id IN(
select A.* from(select id from tp_user where head_img='' order by rand() limit 10) AS A
);
update tp_user
set head_img='http://qingtingcun.youyacao.com/qiniu_202110270836157965414975.png'
where id IN(
select A.* from(select id from tp_user where head_img='' order by rand() limit 10) AS A
);
update tp_user
set head_img='http://qingtingcun.youyacao.com/qiniu_202110270835431933928235.png'
where id IN(
select A.* from(select id from tp_user where head_img='' order by rand() limit 10) AS A
);
此前相关文章
数据库进阶·如何针对所有用户数据中没有的数据去加入随机的数据-蜻蜓Q系统用户没有头像如何加入头像数据-优雅草科技kir_~央千澈~的博客-CSDN博客
边栏推荐
- 药品研发--工艺技术人员积分和职务考核评估管理办法
- 连续三次 | 灵雀云入选Gartner中国ICT技术成熟度曲线报告
- 洛谷P4316 绿豆蛙的归宿
- 新公链时代的跨链安全性解决方案
- 洛谷P2345 MooFest G
- From the technical panorama to the actual scene, analyze the evolutionary breakthrough of "narrowband high-definition"
- [Dynamic Programming Special Training] Basics
- pydev debugger: warning: trying to add breakpoint to file that does not exist: /tmp/xxx
- CWE4.8:2022年危害最大的25种软件安全问题
- 元旦快乐(2022)
猜你喜欢
随机推荐
Technical life | How to draw a big picture of business
固态硬盘接口类型介绍
流量分析三—远程登陆
互联网寒冬,挚友7面阿里,终获Offer
洛谷P2345 MooFest G
常用随机变量的数学期望和方差
Why young people are snapping up domestic iPhone, because it is much cheaper and more populist
How can services start smoothly under tens of millions of QPS
7.24 - 每日一题 - 408
从技术全景到场景实战,透析「窄带高清」的演进突破
AtomicInteger详解
What skills are the most practical for college students in communications?
知识点滴 - 什么是iAP2 (上)
WIFi 开关控制实现-ESP8266 物联网 android studio arduino QT多线程服务器
C#里如何简单的校验时间格式
1.0.0到1.0.2的底层数据库表的更新,需要再重新自建数据库吗?
微服务-gateway【服务网关入门】
指针常量和常量指针概述
中国科学院院属研究单位
7.25 - 每日一题 - 408