Welcome Guest, Not a member yet? Register   Sign In
sql into active records query
#1

[eluser]keevitaja[/eluser]
hello,

can i do this in active records query?

Code:
$sql  = "update " . $this->db->dbprefix('languages') . " set ";
    $sql .= "active = active * -1 where id= ?";
    
    return $this->db->query($sql, $language_id);
#2

[eluser]davidbehler[/eluser]
Code:
$this->db->set('active', 'active * -1', FALSE);
$this->db->where('id', $language_id);
$this->db->update('languages');




Theme © iAndrew 2016 - Forum software by © MyBB