-
Notifications
You must be signed in to change notification settings - Fork 0
How User Trackers work on TikiWiki
romoxi edited this page Sep 10, 2020
·
6 revisions
Unfortunately the I found no description how the tracker stuff is managed in the database.
By study some code, take a look at the tabels in the DB and a little bit trial and error I found out:
In the DB are the following tables:
- trackerId (unique ID)
- name (some name for the tracker)
- description (some description)
- descriptionParsed
- created
- lastModif
- items (number of item in the tracker)
- fieldId (unique ID)
- trackerId (ID from tiki_trackers)
- name (some name for the field - is displayed in the form where you manage the trackers)
- permName (permanent fieldname - should not be changed)
- and a lot of more (not interesting for understanding the concept)
- itemId (unique ID)
- trackerId
- created
- createdBy
- status
- lastModif
- lastModifBy
- itemId (from tiki_trackers_items)
- fieldId (the fieldId from tiki_trackers_fields)
- value (here comes the stuff you want to store)
dont know anything about
dont know anything about
dont know anything about
First you have to kown the right trackerId. Insert a new record in tiki_tracker_items. The Field itemId is auto increment by the database. Read the last_insert_id.
Get the fieldId from tiki_tracker_fields for the field you want to save a value.
Insert a new record in tiki_tracker_item_fields with the fieldId, the last_insert_id and the value you want to save.