How to remove single quotes in prepare statement?

后端 未结 5 2089
余生分开走
余生分开走 2020-12-22 11:16

My query is like this :

$group_id = $session[\'group_id\'];

$sql = \"SELECT *
        FROM notification 
        WHERE group_id IN(?)\";

$result = $this-&g         


        
5条回答
  •  庸人自扰
    2020-12-22 12:00

    I prefer you can use where_in command as below:-

    $this->db->select('*');
    $this->db->where_in('group_id',$group_id);
    $this->db->get('notification');
    

提交回复
热议问题