Jump to content

Recommended Posts

Alright guys, not really a request for help with specific code, more help with how I should start my code...

 

Problem... The client wants an approval system so that any actions performed through the CMS to a website, are held in a pending table to be approved or declined.

 

Possible solution... My previous attempts for this was to use a layer between the Business Logic and Data Access Tier to save all database executions (i.e. insert, update, delete) in a table. If approved, the sql was recombined with the saved variables and executed. If declined, the record was deleted.

 

Anybody any opinions, suggestions which could help?

 

iSE

Link to comment
https://forums.phpfreaks.com/topic/185255-approval-system/
Share on other sites

Can't you just use a simple BOOL flag.  When something is created set it to 0 by default and don't display it.  If approved switch the flag to 1. 

 

i agree.

 

and to help clean house if too many entries are not being approved (if applicable), just set a CRON job to delete all records from the db where approved=0 and x number/amount of days/time has passed (if you want).

Link to comment
https://forums.phpfreaks.com/topic/185255-approval-system/#findComment-977929
Share on other sites

Thats another method, the disadvantage being that it will no longer be a self-contained system which is reusable. This approval system won't always be used, so rather a plug-in type module would be easier to maintain. To be fair, I'm going to try and figure a way to use both, I just don't want to have to go changing all my code to include it, only to change it back again on reuse.

 

Thanks for your opinions though guys.

Link to comment
https://forums.phpfreaks.com/topic/185255-approval-system/#findComment-978425
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.