Forums

Is it ok to add fields to core Joomla tables for indexing?

dzseti 04 Mar, 2014
I have just read this - https://www.chronoengine.com/faqs/60-cfv4/cfv4-working-with-the-database/2619-my-form-data-isnt-saving-to-the-database-correctly.html - and I suspect that the reason I cannot write new records to the Joonla user_profiles table using DB Save is that this table does not have a primary key (it is indexed on two fields user_id and profile_key as idx_uder_id_profile_key).

For some reason I can change existing records, but not create new ones with DB Save.

Is it a solution to add a new field to this database with an autoincrementing primary key? Or will I upset the operation of Joomla by doing this? Or should I look for another solution?
dzseti 04 Mar, 2014
The answer is no, I should not add fields, because Joomla user profile plugin throws errors ...
So I need another solution to write to the user_profiles table!
GreyHead 05 Mar, 2014
Hi dzetsi,

Basic rule - don't mess with the Joomla! core tables (or code either). You can save to the table by adding a custom MySQL query in a Custom Code action in your form.

Bob
This topic is locked and no more replies can be posted.