摘要: http://www.kancloud.cn/z113211/cyh 阅读全文
posted @ 2017-02-28 15:59 pengcx 阅读(143) 评论(0) 推荐(0) 编辑
摘要: $sql = 'select * from example AS ep LEFT JOIN user AS u ON ep.ui d = u.id where ep.touid = :userId ORDER BY dateline desc LIMIT :start,:num'; $params 阅读全文
posted @ 2017-02-22 19:56 pengcx 阅读(1402) 评论(0) 推荐(0) 编辑
摘要: git常用命令使用参考 git add file1.txt file2.txt 添加文件到暂存区 git commit -m "xxx" 提交到本地仓库 git status 仓库当前的状态 git diff file1.txt 比较工作区文件和HEAD区别 git log 显示从最近到最远的提交日 阅读全文
posted @ 2017-02-17 16:38 pengcx 阅读(85) 评论(0) 推荐(0) 编辑
摘要: 1、'email' => array( 'name' => 'email', 'require' => true, 'min' => '1', 'regex' => "/^([0-9A-Za-z\\-_\\.]+)@([0-9a-z]+\\.[a-z]{2,3}(\\.[a-z]{2})?)$/i" 阅读全文
posted @ 2017-02-17 08:40 pengcx 阅读(512) 评论(0) 推荐(0) 编辑
摘要: 使用批量查询,而不是N次循环查询! 重复的数据,不要重复获取; 根据需要,按需要获取表字段,而不是SELECT *; 针对频繁的搜索字段,建立必要的索引,以加快查询速度; 使用关联查询,而不是粗暴地类似:where uid IN (... 这里是成千上W个用户ID ...); 针对单条SQL语句执行 阅读全文
posted @ 2017-02-16 14:46 pengcx 阅读(150) 评论(0) 推荐(0) 编辑
摘要: http://demo.phalapi.net/?service=User.getBaseInfo&user_id=1&__sql__=1 阅读全文
posted @ 2017-02-16 10:54 pengcx 阅读(2257) 评论(0) 推荐(0) 编辑
摘要: http://idea.lanyus.com/ 阅读全文
posted @ 2017-02-15 09:53 pengcx 阅读(170) 评论(0) 推荐(0) 编辑
摘要: 在很多时候,我们会遇到数据库表里面的某个值需要+1操作,我们不能简单地在update的时候写入array('key' => 'key+1'),因为在解析sql的时候,key+1 会带上引号作为一个字符串被处理,所以,这样的操作并没有达到我们想要的效果,当然,这是有解决方法的。具体操作如下: 阅读全文
posted @ 2017-02-13 15:13 pengcx 阅读(3377) 评论(0) 推荐(0) 编辑
摘要: 注意:全文检索模块需要mysql开启全文索引功能,开启方法:修改mysql配置文件:window服务器为my.ini,linux服务器为my.cnf,在 [mysqld] 后面加入一行“ft_min_word_len=1”,然后重启Mysql。 阅读全文
posted @ 2017-02-06 17:06 pengcx 阅读(286) 评论(0) 推荐(0) 编辑
摘要: ps:来源 https://blog.csdn.net/qq_17335153/article/details/52091869 一、修改httpd.conf 文件目录 xampp => apache =>conf => httpd.conf 1.在文件内搜索 关键字“httpd-vhosts.co 阅读全文
posted @ 2017-02-06 11:00 pengcx 阅读(3191) 评论(0) 推荐(1) 编辑