11 2018 档案

摘要:1.对查询进行优化,应尽量避免全表扫描,首先应考虑在 where 及 order by 涉及的列上建立索引。 2.应尽量避免在 where 子句中对字段进行 null 值判断,否则将导致引擎放弃使用索引而进行全表扫描,如:select id from t where num is null可以在nu 阅读全文
posted @ 2018-11-17 09:03 酷酷的城池 阅读(230) 评论(0) 推荐(0) 编辑
摘要:<?phpnamespace app;/** * 加密解密类 * 该算法仅支持加密数字。比较适用于数据库中id字段的加密解密,以及根据数字显示url的加密。 * @author 深秋的竹子 * @version alpha * @加密原则 标记长度 + 补位 + 数字替换 * @加密步骤: * 将a 阅读全文
posted @ 2018-11-17 08:56 酷酷的城池 阅读(3571) 评论(0) 推荐(0) 编辑
摘要:function makecode(){ $code="ABCDEFGHIGKLMNOPQRSTUVWXYZ"; $rand=$code[rand(0,25)].strtoupper(dechex(date('m'))) .date('d').substr(time(),-5) .substr(mi 阅读全文
posted @ 2018-11-05 10:25 酷酷的城池 阅读(1139) 评论(0) 推荐(0) 编辑
摘要:<?php class DB { private $address = 'localhost'; private $username = 'root'; private $password = 'root'; private $db = 'sanbao'; private $table = 'car 阅读全文
posted @ 2018-11-05 10:19 酷酷的城池 阅读(372) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示