Solved

a history log for a database

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
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.
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.

685 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