Solved

a history log for a database

Posted on 2006-10-29
1
195 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
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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Suggested Solutions

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…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

757 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now