php and mysql user tracking and reporting

Posted by inertiahz on Stack Overflow See other posts from Stack Overflow or by inertiahz
Published on 2010-04-27T14:48:34Z Indexed on 2010/04/27 15:03 UTC
Read the original article Hit count: 231

Filed under:
|

Hi, I currently have a table which consists of user information and lesson id; the table layout looks like:

----------------------------------------------------
|employeeID|numVisits|lessonID1|lessonID2|lessonID3|
----------------------------------------------------
|33388     |2        |1        |0        |3        |

and a lessons table which contains the information about the lesson:

------------------------------------------------------
|lessonID  |cateogry |title    |filepath |numberviews|
------------------------------------------------------
|1         |beginner |lesson   |file://  |10         |

Within the lessonID fields in the user table is an integer which tracks how many times someone has clicked on a lesson. Now what I am trying to do is in a report I have the top 5 people who have visited the site and would like to then be able to drill down into what lessons they have clicked on. Can anyone help with this? Or would restructuring the way the database is be an easier task?

Thanks

© Stack Overflow or respective owner

Related posts about php

Related posts about mysql