CodeIgniter get_where

后端 未结 4 471
粉色の甜心
粉色の甜心 2021-01-13 22:10

I’m attempting to use get_where to grab a list of all database records where the owner is equal to the logged in user.

This is my function in my controller;

4条回答
  •  心在旅途
    2021-01-13 22:50

    public function get_records(){
       return $this->db->get_where('table_name', array('column_name' => value))->result();
    }
    

    This is how you can return data from database using get_where() method.

提交回复
热议问题