Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 904303
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T16:01:34+00:00 2026-05-15T16:01:34+00:00

I am building a cms at the moment using the zend framework and have

  • 0

I am building a cms at the moment using the zend framework and have implemented a text based log which will log any errors and allows me to log any custom messages I may want recorded.

As part of the cms I need to provide some sore of revision history for pages, blog posts etc. My thoughts on this were to simple have a logs table to store the user, action, datatime, sql run, table name the query was executed on and the record.

To get the revision history for a page you would just query the log table for the table name and recordid for the current record viewed. Order by date desc. You could then provide the functionality to just revert to the revision desired by running the update statement in the sql column of the log table. If its an insert then figure something out to convert the insert into an update or dont allow the user to revert to the initial insert.

Is this the best way to accomplish this or am I being a bit simple.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T16:01:34+00:00Added an answer on May 15, 2026 at 4:01 pm

    It would be better to add a “revision” column to the tables you want to support revisions, so there will be multiple revisions per document in that table.

    You could also add an “active” column that is 1 for the revision you want to be active, and 0 for other revisions of the same document. That makes it easy to query for the revision you want to show, simply with WHERE active = 1. It also makes it easy to change which revision is active.

    I would not recommend storing complete SQL statements in a log table. That’s an SQL injection security risk.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to build a cms with php using zend framework. I have
We're building a CMS. The site will be built and managed by the users
I'm building a CMS in PHP and one dread I have is that the
I am building a CMS that will support 7 different languages/cultures. For images that
Okay. I'm building a CMS with Zend. It isn't as simple as it looked
I'm building a CMS in ASP.NET MVC and want to allow users to pick
I am building a CMS and the naming convention for classes has been debated
I'm looking at building basic CMS functionality into our web product and am researching
I am building a fairly simple CMS. I need to intercept requests for the
Building the same project (without any changes) produces binary different exe-files: some small regions

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.