Welcome Guest, Not a member yet? Register   Sign In
Practical CodeIgniter 3 - A new book coming soon
#41

(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!

For those that were patient with me for the last 7 or 8 months, I apologize, but much of the time that I should have been writing was spent building out CodeIgniter 4. I hope you don't mind! Smile

kilishan you forgot to fix the code in the CRUD example.
Reply
#42

(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?
Reply
#43

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
Reply
#44

(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.

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

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.
Reply
#45

15 books about CodeIgniter. The last one from Lonnie Ezell #PracticalCI3. Take a look. codeigniter.vanwijhecons.nl/literatuur
Reply




Theme © iAndrew 2016 - Forum software by © MyBB