支付宝赞助帐号:service@kuitao8.com 

mysql常用的笔记

Created2017-09-22   Views 51    Author 懒人程序
UPDATE bt_fck INNER JOIN bt_fck AS b ON bt_fck.re_name=b.user_id
SET bt_fck.re_id=b.id  //通过推荐人的编号修改re_id

UPDATE bt_fck A 
INNER JOIN (SELECT *,COUNT(*) idcount FROM bt_fck GROUP BY re_id) AS B
  ON B.re_id = A.id
SET A.re_nums = B.idcount//mysql 统计推荐人数
UPDATE bt_fck AS A
LEFT JOIN bt_pp AS B
  ON B.code = A.user_id
SET A.u_level = B.ulevel  // 链表更新
上一篇: mysql增加字段
下一篇:没有了
支持键盘 ← →

邮件订阅

订阅我们的精彩内容