随笔分类 -  mysql

摘要:需求: 根据同一表的某条件更新字段 情况一: 以group by 作为条件的 情况二: 不能以group by 作为条件的 调用方法:call proc_update_team_info(); DELIMITER ;; CREATE PROCEDURE () BEGIN DECLARE done t 阅读全文
posted @ 2018-11-20 10:51 geek程序员 阅读(202) 评论(0) 推荐(0)
摘要:设计数据表结构 1, 支持抵扣积分, 余额支付, 在线支付 2, 支持退款按支付方式原路返回 3, 支持订单 部分发货 4, 支持 多个订单,同一物流编号发货 流程 创建订单= 在线支付= 回调修改支付状态= 申请退货= 同意退货/驳回退货(退货和退款是一个流程) 发货= 部分发货/多订单同一物流编 阅读全文
posted @ 2018-08-06 11:14 geek程序员 阅读(4675) 评论(0) 推荐(0)
摘要:Ubuntu常用服务器环境搭建——MySQL篇 MySQL 1.安装MySQL 2.配置MySQL 在[mysqld] 添加以下项 3.配置MySQL权限(重要) 1,允许远程连接 打开配置文件(my.cnf),找到这行 bind address = 127.0.0.1 将这行注释掉, 并在[mys 阅读全文
posted @ 2018-03-31 16:44 geek程序员 阅读(1947) 评论(0) 推荐(0)
摘要:搜索差价 阅读全文
posted @ 2018-02-28 07:52 geek程序员 阅读(111) 评论(0) 推荐(0)
摘要:去掉数据库字段单引号 update company_info set company=REPLACE(company,"'",""); 阅读全文
posted @ 2017-05-02 09:13 geek程序员 阅读(193) 评论(0) 推荐(0)
摘要:delete from user where id not in ( select * from ( select min(id) from user group by username,email ) ) as tmp; 阅读全文
posted @ 2017-05-01 13:37 geek程序员 阅读(112) 评论(0) 推荐(0)
摘要:mac升级了mysql,没有替换原来的链接的情况下,启动mysql restart 会失败解决方法,找到mysql真正的安装目录 mysql.server start 阅读全文
posted @ 2017-04-30 13:11 geek程序员 阅读(656) 评论(0) 推荐(0)
摘要:在mysql 工具 搜索或者插入数据时报下面错误: ERROR 1055 (42000): Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'database_tl.em 阅读全文
posted @ 2017-04-22 10:56 geek程序员 阅读(206) 评论(0) 推荐(0)
摘要:1、安装MariaDB #安装命令yum install mariadb mariadb-server -y#安装完成MariaDB,首先启动MariaDBsystemctl start mariadb#设置开机启动systemctl enable mariadb#接下来进行MariaDB的相关简单 阅读全文
posted @ 2017-01-09 14:28 geek程序员 阅读(175) 评论(0) 推荐(0)
摘要:创建用户并授权 grant all privileges on *.* to 'www'@'localhost' identified by '123456'; #授权www,所有操作,所有表权限grant all privileges on *.* to 'navicat'@'%' identif 阅读全文
posted @ 2016-04-18 09:50 geek程序员 阅读(591) 评论(0) 推荐(0)