I am following a database class for PHP / MySQL. But it must have one specific functionality:
After initializing the class (for example, $ user = new User ();) I must have access to the attributes in the user table as follows:
$ user-> name // returns the value of the name field in the user table
I do not need to define attributes or create any functions to return the attribute value, this should be done automatically when the class is initialized.
Is there such a database class? If not, will someone tell me how I will create this functionality?
source
share