× Pleas keep in mind that SPAM will be deleted instantly

User ID

More
7 years 11 months ago #3854 by rammon
User ID was created by rammon
How should I configure my SQL table and my JooDB database for filling and submit a form of Add-Edit type, automatically insert my User ID in my SQL table?
I use JooDatabase Pro 3.0.3.

Please Log in to join the conversation.

More
7 years 11 months ago #3857 by Dirk
Replied by Dirk on topic User ID
Look at the JooDB tables. All important tables have a field called id.
This field is the Primary Key of the table. It is of type integer auto increment.
The value of the field is unique. that means every entry can be identified by one specific key.

Eg. user: Dirk = id: 24

Relational databases are linked by these keys.
All you have to do is to insert a integer-field into your Joodb main table. Let'call it id_user and set this field as "Joomla User ID" in the setting for database.
Now JooDB will automatically insert the ID of the current user if a User submits a form in frontend.

Now you can also use the "Show Only Userdata" - settings in the catalog menu entry of your database. So the user can only see and edit his entries.

This will only work with the PRO - Version

Please Log in to join the conversation.

Moderators: Dirkjoest