Solved

a history log for a database

Posted on 2006-10-29
1
200 Views
Last Modified: 2008-03-06
hi there
what is the best way to store a history entries for multiple users in a database,
 
for example would it be good to store it in a single column (on the same row as the username) and use "," to separate each entry or will it be better to store entries in a separate table with there corresponding "username" so that they can be identifyed
or is there a better way to do this?
0
Comment
Question by:intazaar
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 17

Accepted Solution

by:
HuyBD earned 500 total points
ID: 17831504
In common way, the log table should be

user_id(int)   action_datetime(datetime)   Action(int)   Description(varchar)


The action is an enum that was defined before, e.g. 1: insert, 2: delete ...................
0

Featured Post

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Generating table dynamically is the most common issue faced by php developers.... So it seems there is a need of an article that explains the basic concept of generating tables dynamically. It just requires a basic knowledge of html and little maths…
Many old projects have bad code, but the budget doesn't exist to rewrite the codebase. You can update this code to be safer by introducing contemporary input validation, sanitation, and safer database queries.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question