2019年1月3日

php namespace命名空间

摘要: test.php <?phprequire 'a.php';require 'b.php'; use a\b\a as A;use a\c\a as C; new A(); echo "<hr >"; new C(); a文件 <?phpnamespace a\b ; class A{ public 阅读全文

posted @ 2019-01-03 10:43 炊厨 阅读(89) 评论(0) 推荐(0)

2018年4月3日

php数组键(“ ” ,null,false, true)的问题

摘要: $arr =[ 1=>'controller', 2=>'destruct', ''=>'construct', //索引 [] null =>'swith', //索引 [] true=>'while', //索引 1 false=>'zero', //索引 0 ]; print_r($arr... 阅读全文

posted @ 2018-04-03 21:04 炊厨 阅读(244) 评论(0) 推荐(0)

2018年3月24日

php结合redis实现高并发下的抢购、秒杀功能

摘要: https://blog.csdn.net/nuli888/article/details/51865401 阅读全文

posted @ 2018-03-24 09:02 炊厨 阅读(121) 评论(0) 推荐(0)

2017年8月2日

MySQL外键约束On Delete、On Update

摘要: 使用外键实现Create Table: CREATE TABLE `child` ( `par_id` int(11) NOT NULL, `child_id` int(11) NOT NULL, PRIMARY KEY (`par_id`,`child_id`), FOREIGN KEY (`par_id`) REFERENCES `parent` (`pa... 阅读全文

posted @ 2017-08-02 14:12 炊厨 阅读(448) 评论(0) 推荐(0)

2017年7月31日

js错误信息打印到页面函数

摘要: function p(message){ var console = document.getElementById('debuginfo'); if(console null){ console = document.createElement("div"); console.id = "debu 阅读全文

posted @ 2017-07-31 10:24 炊厨 阅读(330) 评论(0) 推荐(0)

2017年7月14日

thinkphp 多数据插入

摘要: public function _initialize(){ $this->m = M('Abc'); } public function add2(){ $sql= "insert into ysn_abc (value) values"; set_time_limit(0); echo date('H:i:s'); for($i=0;$iexecute($sql)... 阅读全文

posted @ 2017-07-14 16:46 炊厨 阅读(202) 评论(0) 推荐(0)

thinkphp3.2.3使用事物

摘要: public function _initialize(){ $this->m = M('Abc'); } public function add4(){ $this->m->startTrans(); $info1 = $this->m->where(array('id'=>100))->find(); $info2 = $this->m->add(array('valu... 阅读全文

posted @ 2017-07-14 10:53 炊厨 阅读(678) 评论(0) 推荐(0)

Mysql MERGE引擎简介 表合并

摘要: Create Table: CREATE TABLE `t1` ( `a` int(11) NOT NULL, PRIMARY KEY (`a`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 Create Table: CREATE TABLE `t2` ( `a` int(11) NOT NULL, PRIMARY KEY (`a`) ) ENGINE=M... 阅读全文

posted @ 2017-07-14 10:44 炊厨 阅读(185) 评论(0) 推荐(0)

2017年6月16日

mysql 分表

摘要: DROP TABLE IF EXISTS `article`; CREATE TABLE `article` ( `id` bigint(20) NOT NULL, `subject` varchar(200) NOT NULL, `content` text NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MRG_MyISAM DEFAULT CHARSET=utf... 阅读全文

posted @ 2017-06-16 16:28 炊厨 阅读(172) 评论(0) 推荐(0)

mysql 删除数据恢复

摘要: 确认bin-log日志是否开启 SHOW VARIABLES LIKE 'log_bin' 开启bin-log mysql的配置文件my.ini,所在目录C:\Documentsand Settings\All Users\Application Data\MySQL\MySQL Server 5.6 。添加log-bin=”log_bin”,bin-lo... 阅读全文

posted @ 2017-06-16 10:05 炊厨 阅读(280) 评论(0) 推荐(0)

导航