Problem with active record - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: Problem with active record (/showthread.php?tid=7423) |
Problem with active record - El Forum - 04-08-2008 [eluser]rhasan[/eluser] Hi, I am running the following code from a controller Code: $this -> db -> select('age', 'name'); Code: A PHP Error was encountered Problem with active record - El Forum - 04-08-2008 [eluser]barbazul[/eluser] the select() method takes only 1 parameter simply change to look like this: Code: $this -> db -> select('age,name'); It could be interesting to request passing multiple parameters as a supported feature though Problem with active record - El Forum - 04-08-2008 [eluser]Seppo[/eluser] As a matter of fact, select accept two parameters. The second is used to avoid field escaping. However in this case, an array of fields can be used. Code: $this->db->select(array('age', 'name')); BTW, @Barbazul Regards from Cris & Pedro =) Problem with active record - El Forum - 04-08-2008 [eluser]rhasan[/eluser] Thanks both of you for such quick reply |