上一页 1 ··· 52 53 54 55 56 57 58 59 60 ··· 75 下一页
摘要: 首先我们建立一张带有逗号分隔的字符串。 CREATE TABLE test(id int(6) NOT NULL AUTO_INCREMENT,PRIMARY KEY (id),pname VARCHAR(20) NOT NULL,pnum VARCHAR(50) NOT NULL);然后插入带有逗 阅读全文
posted @ 2017-04-14 08:32 午火39 阅读(1339) 评论(0) 推荐(0)
摘要: 表中有一个字段:keyword, keyword里面的存储的字符一般是:[关键字1,关键字2,关键字3] 那么,在搜索的时候,不能用like 来模糊查询,因为这样会,多查询出一下不相干的关键字, hi,hello,嗨 航空,飞机,大飞机 非常,快乐,你快乐吗 select INSTR(WKEYWOR 阅读全文
posted @ 2017-04-13 16:35 午火39 阅读(1034) 评论(0) 推荐(0)
摘要: 1.分割函数:SUBSTRING_INDEX('浙江温州-中国电信','-','1') 2.用例(筛选'-'前至少4个汉字的数据) a.数据分布 b.筛选sql c.结果 阅读全文
posted @ 2017-04-13 16:09 午火39 阅读(16024) 评论(0) 推荐(0)
摘要: 参照手册,调用redis,报错,真坑: Yii::$app->redis 后改改用: Yii::getRedis(); 阅读全文
posted @ 2017-04-12 11:36 午火39 阅读(317) 评论(0) 推荐(0)
摘要: 解决方案如下: (关键) 示例代码中,加密解密类的实例创见通过 Class 同名方法 的方式创建。 public function WXBizMsgCrypt($token, $encodingAesKey, $appId){$this->token = $token;$this->encoding 阅读全文
posted @ 2017-04-11 19:03 午火39 阅读(1210) 评论(0) 推荐(0)
摘要: yii2:多条件多where条件下碰到between时,between语句如何处理呢? 我有一张表:id,name,telphone,ticket_no,status,create_time等字段, 在出具多条件查询时(当不涉及到时间范围或其他范围),可以用如下语句: 当涉及到create_time 阅读全文
posted @ 2017-04-06 15:10 午火39 阅读(20049) 评论(0) 推荐(0)
摘要: yii2如何输出sql语句? 单表查询sql: 我的model是:coupon,那么sql输出为: $a = coupon::find()->createCommand()->getRawSql();var_dump($a); 多表查询sql: 阅读全文
posted @ 2017-04-06 15:02 午火39 阅读(1781) 评论(0) 推荐(0)
摘要: 1.通过火狐 sqlite mananger工具,将.db3文件,导出为.sql文件2.右击表面content,属性:Export table 3.不要勾选 include create table.... 不要勾选 begin transaction/commit。。。 4.点击ok导出5.然后用 阅读全文
posted @ 2017-04-03 11:34 午火39 阅读(1994) 评论(0) 推荐(0)
摘要: 我们都知道net use可以建立网络驱动器映射,这里不说了。 我今天刚看到这命令的,叫镜像虚拟磁盘subst命令,这个命令可以简化好多操作,比如一个常用的文件放在一个路径很深的文件夹中,每次我们想要操作这些文件就必须沿着文件夹的路径一级一级地打开,这样操作很费时【现在我的操作一般都是在根目录下写一个 阅读全文
posted @ 2017-03-31 18:44 午火39 阅读(2862) 评论(0) 推荐(0)
摘要: yii2:行为 行为是 yii\base\Behavior 或其子类的实例。 就是:将一个类的属性和方法,赋给另一个类使用。 例如: behavior 然后controller中使用: 阅读全文
posted @ 2017-03-23 14:59 午火39 阅读(621) 评论(0) 推荐(0)
上一页 1 ··· 52 53 54 55 56 57 58 59 60 ··· 75 下一页