tp5中使用原生sql
摘要:注意事项: 1.先在database.php中配置好数据库 2.只要是数据库操作必须引用 use/think/Db;严格区分大小写。 下面是方法: public function hello5() { //所有查询必须 use/think/Db; /* 1 配置数据库 * 2 使用DB 命名空间 *
阅读全文
mysql replace (替换)
摘要:UPDATE `email_error` SET `email_error` = REPLACE( email_error, '%', '' ) WHERE 1
阅读全文
MySql反向模糊查询
摘要:平时开发中,常用一些模糊查询,例如查询表格user中uname包含“塔”的数据,可以使用如下三种方式: select * from user where uname like '%塔%';select * from user where INSTR(uname,'塔');select * from
阅读全文
mysql高级查询(转的)
摘要:基本常用查询 --select select * from student; --all 查询所有 select all sex from student; --distinct 过滤重复 select distinct sex from student; --count 统计 select cou
阅读全文
PHP Content-type 的说明
摘要:<?php$mimetypes = array('ez' => 'application/andrew-inset','hqx' => 'application/mac-binhex40','cpt' => 'application/mac-compactpro','doc' => 'applica
阅读全文