Welcome Guest, Not a member yet? Register   Sign In
Query results - passing a string
#8

You can add a __set() magic method to your class to format the data when the object is originally built. A __get() method (or any other method used to retrieve data from the class) will deal with the data as it is stored in the object, which can be useful if you need to change it for a given use, but, in most cases, you just want to convert the data from the database format to a more useable format for PHP when the object is originally created.
Reply


Messages In This Thread
Query results - passing a string - by groovebird - 08-22-2015, 06:25 AM
RE: Query results - passing a string - by CroNiX - 08-22-2015, 08:23 AM
RE: Query results - passing a string - by mwhitney - 08-31-2015, 12:44 PM



Theme © iAndrew 2016 - Forum software by © MyBB