Welcome Guest, Not a member yet? Register   Sign In
Creating multiple instances of a model
#3

(04-28-2016, 07:17 AM)Wouter60 Wrote: The first example is never a good idea. If a model is already loaded, it will not load again.
The second example isn't a good idea either. It makes your code unnecessarily complex.

Please, explain what you are trying to do. It appears to me that you want to fetch a list of customers from your database, is that correct?

Yes, that's correct.  But each customer should be an object/model with access to the relevant class functions.
Reply


Messages In This Thread
RE: Creating multiple instances of a model - by CINewb - 04-28-2016, 07:52 AM



Theme © iAndrew 2016 - Forum software by © MyBB