Thinkphp的数据集返回类型

官方的配置database.php默认的是array

// 数据集返回类型
'resultset_type'  => 'array',

建议改为collection

// 数据集返回类型
'resultset_type'  => 'collection',

可以使用Collection类包含的方法。链式操作

猜你喜欢

转载自blog.csdn.net/qq_28137309/article/details/86571728