I had a rather short question, doesn't OOP Programming make you increase the amount of executed queries?
class Guild{
private $members[];
private $sName;
private $iLevel;
function __construct($guildId)
{
// get all information from db using the guildid
// also get all memberid's from the db and pass these trough
// to the constructor of the Personclass.
}
}
class Person{
private $sName;
function __construct($userid)
{
// now get my information from the db using my userid.
}
}
And is there a way to do this diffrent?
Is it common by the way to use the constructor to get the information from the database and use the destruct it to save the modified fields?
Kind regards