LEFT JOIN in ZF2 using TableGateway

前端 未结 7 1758
无人共我
无人共我 2021-01-03 23:01

I have a table:

*CREATE TABLE IF NOT EXISTS `blogs_settings` (
  `blog_id` int(11) NOT NULL AUTO_INCREMENT,
  `owner_id` int(11) NOT NULL,
  `title` varchar(         


        
7条回答
  •  星月不相逢
    2021-01-03 23:14

    You have to include username field in the BlogsSetting Model that is used as model from BlogsSettingTable (The TableGateway)

    class BlogsSetting {
        public $blog_id;
        public $interest_id;
        public $owner_id;
        public $title;
        public $meta_description;
        public $meta_keywords;
        public $theme;
        public $is_active;
        public $date_created;
        public $username;
    
        public function exchangeArray($data)
        {
            // Create exchangeArray
        }
    }
    

    Hope this helps

提交回复
热议问题