Hi I’m new to OOP with PHP. I’m wondering how OO comes into play when selecting data from a table. i.e. i have a users table and a user profile page. So I have a User class. Do I select the user data from the table then create a new object of class User and define the properties?
Thanks for anyone that can clear this up for me!
Regards,
Jonesy
That’s it, you can create a UserManager class, that selects user data and create User object(s) (depending on you WHERE clause) with it. This class could have the following methods : selectUserById(), selectUsersByAge(), etc…