[eluser]Unknown[/eluser]
In two tables of my database, I use the same coding frame for a common variable. This maps a relatively small number of values (around 10) to longer strings and doesn't seem worth creating a new table to perform joins on to.
What is the best way of decoding the values pulled out of these tables?
If they were only used in one table then I would simply create the mapping as an associative array defining a model property and use that in the model functions. However, when two different tables use it - this is trickier unless I perhaps create a parent class with the decoding function. Alternatively, I could create a static decoding function in one model that both models can use. Or a decoding plugin. Or a static function in a new library class.
Someone please tell me what the best approach is.