【问题标题】:How to show data from multiple section in codeigniter?如何在codeigniter中显示来自多个部分的数据?
【发布时间】:2019-11-22 12:27:35
【问题描述】:

如何在不使用codeigniter中的join的情况下,从不同的表中的多个部分的单个页面中调用动态数据?

【问题讨论】:

  • 您可以在 JSON 数据中更新您的数据,然后您可以在没有数据库的情况下使用它。

标签: database view codeigniter-3


【解决方案1】:

希望这篇文章能帮到你:-

public function index()
    {
        $this->load->model('modal_1');
        $this->load->model('modal_2');
        $this->load->model('modal_3');
        $data['modal_data1']=$this->modal_1->function_name();
        $data['modal_data2']=$this->modal_2->function_name();
        $data['modal_data3']=$this->modal_3->function_name();
         ////PRINT RECORDS/////
        print_r($data);
        ////////GET RECORDS IN VIEW PAGE/////
       //$this->load->view('home_page',$data);
    }

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2014-04-01
    • 1970-01-01
    • 2015-04-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-09-20
    相关资源
    最近更新 更多