![]() |
Update sql query of multiple fields not working - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: Update sql query of multiple fields not working (/showthread.php?tid=73046) |
Update sql query of multiple fields not working - Ann - 03-13-2019 Hi everybody, I'm trying to do an update query, it actually works updating one field but not with multiple fields. Here's my code on the model: PHP Code: $array = array( As you can see it is a big query what I must do... Can someone help me? ![]() RE: Update sql query of multiple fields not working - paulkd - 03-16-2019 Try Code: $this->db->where('WEBLOGIN', $WEBLOGIN); or Code: $condicion = "WEBLOGIN = '{$WEBLOGIN}' AND TIE_Codigo = {$TIE_Codigo}"; You don't need the transaction block if you are performing a single update. I haven't tested the above code. Good Luck. |