Welcome Guest, Not a member yet? Register   Sign In
Or in a select statement
#1

PHP Code:
function select($table_name$where_data){
            $this->db->select('*');
          $this->db->from($table_name);
          $this->db->where($where_data);
        
$this->db->order_by('id','DESC');
          $query $this->db->get();
        
// echo $str = $this->db->last_query();
          return $query->result();




If I want to do an "or" is this right


$user_data=$this->action->select("table", array("a"=>$a, "b"=>$b) or array("c"=>$c, "b"=>$b));



Thanks
Reply


Messages In This Thread
Or in a select statement - by Knutsford - 03-11-2021, 06:44 AM
RE: Or in a select statement - by iRedds - 03-11-2021, 10:18 AM
RE: Or in a select statement - by Knutsford - 03-11-2021, 10:27 AM
RE: Or in a select statement - by iRedds - 03-11-2021, 04:49 PM



Theme © iAndrew 2016 - Forum software by © MyBB