The following methods are available within the Table Access class and can be extended by derived classes:

  • readData reads out the corresponding record from the database. With special deliveries the SQL statement can still be changed. (Eg.: roles_class.php)
  • clear initializes all read data. The method can initialize more data in derived specific class (Eg.: organization_class.php)
  • setArray If previously read the data in an array, you can pass this array to the class and then works with the data. This makes sense, if the data are read in the script through a loop, but will be accessed with methods of the class
  • setValue If you want to change a value, this be done using this method. The method can be derived in the specific class to apply to specific tests to the passed data eg. is_numeric (Eg.: roles_class.php)
  • getValue returns a value. The method can be derived in the specific class if necessary to put other data there (Eg.: users_class.php)
  • save the method checks if data has been changed and they have to be written back to the database. The method can be derived in the specific class, if details have to be preassigned before an update / insert. It is usefull when the user is stored together with the time, who made the last change. (Eg.: dates_class.php)
  • delete deletes the current record from the database. The method can be derived in the specific class, if previously other data (references) must be erased or changed (Bsp: roles_class.php)

Internally, all data read from the table data is stored in an array $db_fields. So who needs at certain points more rapid access to all data, may also have direct access to the array.

  • en/entwickler/tabellenzugriffsklassen.txt
  • Last modified: 2016/12/03 15:11
  • by ximex