I have this function called Core that contains a lot of functions.
1.) Use Core's getters to fetch a data in my database
Example : ( i have getUsername in my Core function )
$Core->getUsername(); // to get the username $Core->getUserid(); // to get the userid
Each getters runs a query, ( e.g. SELECT something FROM somewhere )
I'm currently using this, but I think, for some reasons which I'm not sure of, that this style can somehow slows my scripts. ( Not sure, maybe because of the many queries )
2.) Use Procedural style? I mean, not really ( IDK, not familiar with teh terminologies ). I'll create a function that returns an array of the fetched results ( Gets all the info needed and store it in an array, like : username, userid, gender, etc.. )
$theArray = $Code->getAllInABunch(); // code to print $theArray
3.) If you have any suggestions, kindly post here. I'm a starter and in need of help. I'm like 40% in finishing this system. :> Thanks!