I'm developing a joomla module, where I want to do some recalculation of the output, if the admin changes a specific module setting. One way to implement this, would be to use an additional table, where the setting since the last call is saved and compared to the current setting. However this means, that I would need an additional table, which does not look elegant and simple to me. So I was wondering if there is a better way to realize this feature?
To make it more clear: The admin can switch between OpenStreetMap and Google Maps. If he changes the field I need to make a search request during the next module call and save the result to the database.
Pseudo-Code Example:
if(changed($params->get('searchprovider')) == true){
$result = searchRequest();
saveResultToDatabase($result);
}
$dbResult = loadResultFromDatabase();
showResult($dbResult);
#__fields_values
is a pre-existing table which was designed to be flexible and store different kinds of data. However, with that flexibility comes a drag on performance -- which becomes noticeable when dealing with large volumes of data. Setting up another db outside of the core db is not a silly option. Please edit your question to offer more specifics about your module.#__fields_values
is a dumping ground for any string. There are no "rules" about what values should be stored there.#__fields_values
is not a "dumping ground". It stores data associated with custom fields managed by Fields component. Don't store random data there.