当前位置:网站首页>松鼠短视频系统为用户加入随机头像代码-快速为用户加上随机头衔
松鼠短视频系统为用户加入随机头像代码-快速为用户加上随机头衔
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博客
边栏推荐
猜你喜欢
随机推荐
7.21 - 每日一题 - 408
微服务-gateway【服务网关入门】
快手web did可用生成
What is the use of IT assets management software
How to build a quasi-real-time data warehouse?
通信大学生走向岗位,哪些技能最实用?
备战无人机配送:互联网派To C、技术派To B
NIO's Selector execution process
What skills are the most practical for college students in communications?
如何获取EasyCVR平台设备通道的RTMP视频流地址?
互联网寒冬,挚友7面阿里,终获Offer
洛谷P2574 XOR的艺术
洛谷P1502 窗口的星星
进程与线程
浅谈混迹力扣和codeforces上的几个月
项目分析(复杂嵌入式系统设计)
监控易火星版即将亮相:分布式运维帮助TOP3000大企业跨越管理鸿沟
NIO基础之三大组件
香农与信息论三大定律
Functional test points for time, here is a comprehensive summary for you