Solved

a history log for a database

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

Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

Question has a verified solution.

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

Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit (http://en.wikipedia.org/wiki/PHPUnit) and similar technologies have enjoyed wide adoption, making it possib…
This article discusses how to create an extensible mechanism for linked drop downs.
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.

695 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