partition($data, $field, $rule); // $data 分表字段的数据 // $field 分表字段的名称 // $rule 分表规则 // 用于写入 $data = [ 'user_id' => 110, 'user_name' => 'think' ]; $rule ...
分类:
数据库 时间:
2020-05-11 13:13:47
阅读次数:
67
Abstract: Why you need to learn some ML knowledge at least. You know that ML has everwhere! When you are visiting though some e shop and click some go ...
分类:
其他好文 时间:
2020-05-11 00:39:46
阅读次数:
80
https://onedrive.live.com/?id=F5B0090663FEEADA%21105&cid=F5B0090663FEEADA 数目在这里:https://program-think.blogspot.com/2020/03/share-books.html ...
分类:
其他好文 时间:
2020-05-10 23:26:47
阅读次数:
74
数据表结构如下: 控制器核心代码: <?php namespace app\index\controller; use think\Controller; class Goods extends Controller { public function product_category() { re ...
分类:
Web程序 时间:
2020-05-10 21:28:25
阅读次数:
68
事件 1. 事件和中间件有一点相似,只不过事件更加的精准定位更细腻的业务场景; 2. 事件可定义:事件类、事件监听类、事件订阅类; 3. 我们先创建一个测试事件的类:TestEvent.php,手动创建一个测试类; public function __construct() { //注册监听器 Ev ...
分类:
Web程序 时间:
2020-05-08 18:06:24
阅读次数:
144
获取用户数: Db::table('think_user')->count(); // 助手函数 db('user')->count(); 或者根据字段统计: Db::table('think_user')->count('id'); // 助手函数 db('user')->count('id'); ...
分类:
其他好文 时间:
2020-05-08 10:14:40
阅读次数:
151
namespace app\index\controller; use think\Controller; use app\index\model\User; class Index extends Controller { public function index() { $User = new ...
分类:
其他好文 时间:
2020-05-08 10:06:44
阅读次数:
92
Db::table('think_user') ->where('id','>',1) ->where('name','thinkphp') ->select(); Db::field('user.name,role.title') ->table('think_user user,think_ro ...
分类:
其他好文 时间:
2020-05-08 09:50:38
阅读次数:
53
namespace app\index\controller; use think\Controller; class Index extends Controller { public function _initialize() { echo 'init<br/>'; } public func ...
分类:
其他好文 时间:
2020-05-08 09:38:41
阅读次数:
47
namespace app\index\controller\one; use think\Controller; class Blog extends Controller { public function index() { return $this->fetch(); } public fu ...
分类:
其他好文 时间:
2020-05-08 09:23:46
阅读次数:
122