Practical CodeIgniter 3 - A new book coming soon |
(08-12-2016, 11:46 AM)kilishan Wrote: Oops - I forget to mention that the book was completely wrapped up a week or two ago. So, if you've been waiting until it was finished to grab a copy, now's the time! kilishan you forgot to fix the code in the CRUD example. (08-13-2016, 08:22 AM)Paradinight Wrote: kilishan you forgot to fix the code in the CRUD example. Please refresh my memory, then. I looked through that chapter and am not seeing anything wrong. I know that one or two people have brought up that in a couple of places I use instances like $this->where() instead of $this->db->where(), but I'm pretty sure I've replied each time. The __call() will translate those calls to the db object, so it still works. Was there something else?
The __call method is wrong. The "get" method in Codeigniter return not the db object. It return a result object. The result does not exist in the db object.
In the __call method you need to return the result object. http://www.codeigniter.com/user_guide/da...ilder::get http://www.codeigniter.com/user_guide/da...er::select (08-14-2016, 12:53 AM)Paradinight Wrote: The __call method is wrong. The "get" method in Codeigniter return not the db object. It return a result object. The result does not exist in the db object. Well, damn, you're right. Thanks for catching that! I've fixed it up in the text and the sample code and pushed another version live.
15 books about CodeIgniter. The last one from Lonnie Ezell #PracticalCI3. Take a look. codeigniter.vanwijhecons.nl/literatuur
|
Welcome Guest, Not a member yet? Register Sign In |