![]() |
Where something and something SQL - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Where something and something SQL (/showthread.php?tid=48910) |
Where something and something SQL - El Forum - 02-01-2012 [eluser]kolxoznik1[/eluser] I have read user_guide and do not found WHERE something AND something. So I need to check WHERE a = 3 and a = 5 so as I understand Quote: $this->db->where('user_id', $user_id); two WHERE mean AND ? Code: function add_follow($user_id, $follow_id) is it correct? Where something and something SQL - El Forum - 02-01-2012 [eluser]Patrick Spence[/eluser] [quote author="kolxoznik1" date="1328148220"]I have read user_guide and do not found WHERE something AND something. is it correct? [/quote] That's how I use it. Where something and something SQL - El Forum - 02-01-2012 [eluser]CroNiX[/eluser] Yep, that's exactly what the example in the user guide shows for where() in active record. Quote:$this->db->where('name', $name); Where something and something SQL - El Forum - 02-02-2012 [eluser]vbsaltydog[/eluser] Alternatively using method chaining: Code: $this->db |