how do i ignore the backticks in codeigniter when using active records? i need to order by cases

后端 未结 3 1035
星月不相逢
星月不相逢 2020-12-12 02:59

how do i ignore the backticks in codeigniter when using active records? i need to order by cases

case when roll_number is null then 1 else 0 end,

3条回答
  •  Happy的楠姐
    2020-12-12 03:34

    Thanks for your answers...

    I figured out that in active records when using $this->db->order_by() you can't skip the backticks.

    So ended up using $this->db->query($sql); where I assigned my normal mysql query to the $sql variable

提交回复
热议问题