求助关于 TP5 模型覆盖问题

浏览:478 发布日期:2018/09/10 分类:求助交流
class TAgentTotalModel extends Model
{
    protected $table = "t_agent_total";
    private $db_;

    function __construct()
    {
        $this->db_ = Db::name($this->table);
    }
模型中是这样写的,多个模型实例化出现这个问题。见下方object(app\model\TAgentTotalModel)#27 (35) {
  ["table":protected] => string(13) "t_agent_total"
  ["db_":"app\model\TAgentTotalModel":private] => object(think\db\Query)#28 (9) {
    ["connection":protected] => object(think\db\connector\Mysql)#6 (15) {
      ["builder":protected] => string(23) "\think\db\builder\Mysql"
      ["PDOStatement":protected] => object(PDOStatement)#13 (1) {
        ["queryString"] => string(286) "SELECT count(1) as num FROM `o_bargain` WHERE  `role` = :where_role  AND `status` IN (:where_status_in_1,:where_status_in_2,:where_status_in_3,:where_status_in_4)  AND `agent_id` = :where_agent_id  AND `create_time` BETWEEN :where_create_time_between_1 AND :where_create_time_between_2 "
      }
      ["queryStr":protected] => string(286) "SELECT count(1) as num FROM `o_bargain` WHERE  `role` = :where_role  AND `status` IN (:where_status_in_1,:where_status_in_2,:where_status_in_3,:where_status_in_4)  AND `agent_id` = :where_agent_id  AND `create_time` BETWEEN :where_create_time_between_1 AND :where_create_time_between_2 "
      ["numRows":protected] => int(1)
      ["transTimes":protected] => int(1)
      ["error":protected] => string(0) ""
      ["links":protected] => array(1) {
最佳答案
评论( 相关
后面还有条评论,点击查看>>