
SQL
JustMarker
web
展开
-
安装mysql8.0流程,及报错、缺少依赖处理
安装mysql8.0 1. 先下载了 mysql-community-server-8.0.18-1.el7.x86_64.rpm 2. 执行命令:rpm -ivh mysql-community-server-8.0.18-1.el7.x86_64.rpm 报错: 3. 缺少依赖,百度了一下,执行命令:yum -y install numactl 少了,但还是有报错: ...原创 2019-11-28 09:41:39 · 6075 阅读 · 0 评论 -
判断几个参数的不同状态,不同的情况写SQL语句判断条件,优化做法(仅供新手)
假如,有 $a,$b,$c这三个变量,复杂的做法是这样的://假如三个值都不为空 if($a != null && $b != null && $c != null){ $where = "test1 =a and test2 = b and test3 = c "; } //假如$a为空 if($a == null && $b != null && $c != null){ $wh原创 2015-12-07 18:31:14 · 1739 阅读 · 1 评论 -
thinkphp调用存储过程
thinkphp貌似不能直接调用存储过程,要用原生的方法。 代码如下:$userInfo_proc = "call proc_get_userinfo_details(".$data['userid'].",''); ";//传了个参数 $res = mysql_query($userInfo_proc);//执行存储过程 $res = mysql_fetch_assoc($res);原创 2016-09-07 18:17:19 · 5373 阅读 · 0 评论