In version 22.1, the database table firmendaten
will be removed completely. Therefore, all code that is accessing this table using a direct SQL query MUST be updated.
Additionally, it is recommended to also stop using direct SQL queries with the firmendaten_werte
table, as this will allow for performance improvements.
Old code that is using a direct SQL query won't work anymore:
$this->app->DB->Query("UPDATE firmendaten SET freifeld13='Duft' where id='1'");
How to update: Use the SystemSettings
service instead:
app(\App\Core\Settings\SystemSettings::class)->set('freifeld13', 'Duft');
Old code is fetching value of briefpapier2
using a direct SQL query:
$briefpapier2 = $this->app->DB->Select("SELECT briefpapier2 FROM firmendaten WHERE id={$firmendatenid}");
How to update: Use the SystemSettings
service instead:
$briefpapier2 = app(\App\Core\Settings\SystemSettings::class)->get('briefpapier2');
It is highly recommended to stop using direct SQL queries also with the firmendaten_werte
table.
Old code:
$land = $this->app->DB->Select("SELECT wert FROM firmendaten_werte WHERE name = 'land'");
How to fix:
$land = app(\App\Core\Settings\SystemSettings::class)->get('land');