oo7ml
08-26-2008, 10:37 AM
I'm creating a new tracking system on my site to allow members to see new content posted by administrators (unread content)
I have two questions which are marked throughout this post and i would be extremely happy to hear your thoughts and opinions on both of them:
I'm planning on creating a new tracking table with the following fields:
id - primary key
track_id - each item (piece of content) will be assigned a track_id
user_id - each track_id will be assigned to multiple user_id’s
status - auto set to 0 this will change to 1 when the content is read
date - for future design, if i ever need to know when content was read
Every post created by an administrator will need to be tracked by the tracking table before the content in the admin form is uploaded to the appropriate table. So if i have 50 users, the system should create 50 new records in the tracking table using one track_id for each user_id - 1. is this the best way of achieving this system.
After this has been carried out, the content in the admin form can then finally be uploaded to the designated table along with inserting the track_id into this table as well (to establish a relationship between the two tables)
The reason i choose to carry out the tracking first is because i need to get a track_id first, so that i can insert it into the designated content table as well
2. How do i increment the track_id field in the tracking table when a new tracker is created. Obviously the id field will be set to auto increment but i can't set the track_id field to auto increment as there will be 50 (no. of users) records using the same track_id for each item posted.
And sorry, another question 3. Does all this make sense, is there a better way to create this system (without using third party software)
thanks in advance
I have two questions which are marked throughout this post and i would be extremely happy to hear your thoughts and opinions on both of them:
I'm planning on creating a new tracking table with the following fields:
id - primary key
track_id - each item (piece of content) will be assigned a track_id
user_id - each track_id will be assigned to multiple user_id’s
status - auto set to 0 this will change to 1 when the content is read
date - for future design, if i ever need to know when content was read
Every post created by an administrator will need to be tracked by the tracking table before the content in the admin form is uploaded to the appropriate table. So if i have 50 users, the system should create 50 new records in the tracking table using one track_id for each user_id - 1. is this the best way of achieving this system.
After this has been carried out, the content in the admin form can then finally be uploaded to the designated table along with inserting the track_id into this table as well (to establish a relationship between the two tables)
The reason i choose to carry out the tracking first is because i need to get a track_id first, so that i can insert it into the designated content table as well
2. How do i increment the track_id field in the tracking table when a new tracker is created. Obviously the id field will be set to auto increment but i can't set the track_id field to auto increment as there will be 50 (no. of users) records using the same track_id for each item posted.
And sorry, another question 3. Does all this make sense, is there a better way to create this system (without using third party software)
thanks in advance