Norsk.Firefox Posted January 9, 2008 Share Posted January 9, 2008 Hello I want to log what the users of my site does. I want to insert a post in the database when the user posts a comment to another's blog or anything else he does. So, my thinking were: Make a database named `history`, fields `id` INT, `user_id` INT, `type` INT (What the user did), val1 INT (for example the ID to the comment he/she wrote), val2 INT, val3 INT. but the problem I've met so far is that if I want to show 50 entries in the database `history` I have to create another query for every result. A picture to illustrate if it's easier(?). Anyone have a way to do this easier/better/faster? Quote Link to comment https://forums.phpfreaks.com/topic/85240-log-what-users-do/ Share on other sites More sharing options...
mrdamien Posted January 9, 2008 Share Posted January 9, 2008 if I want to show 50 entries in the database `history` I have to create another query for every result. Do you mean that you need to create a separate query for each `type`? Please clarify. Quote Link to comment https://forums.phpfreaks.com/topic/85240-log-what-users-do/#findComment-434861 Share on other sites More sharing options...
Norsk.Firefox Posted January 9, 2008 Author Share Posted January 9, 2008 yes, and then run the right time for every row, wasting a lot of resources. Quote Link to comment https://forums.phpfreaks.com/topic/85240-log-what-users-do/#findComment-434926 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.