I'm after a model-based database class for PHP/MySQL. But it must have one particular functionality:
Once the class is initialised ( e.g $user=new User(); ) I should be able to access the attributes in the user table as follows:
$user->name // returns the value of the 'name' field in the user table
I should not have to define the attributes or need to create any functions to return the attribute value, it should be done automatically when the class is initialised.
Is there such a database class out there? If not can someone tell me how I would go about creating this functionality?