iSE Posted December 15, 2009 Share Posted December 15, 2009 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 Quote Link to comment https://forums.phpfreaks.com/topic/185255-approval-system/ Share on other sites More sharing options...
jcombs_31 Posted December 15, 2009 Share Posted December 15, 2009 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. Quote Link to comment https://forums.phpfreaks.com/topic/185255-approval-system/#findComment-977923 Share on other sites More sharing options...
mrMarcus Posted December 15, 2009 Share Posted December 15, 2009 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). Quote Link to comment https://forums.phpfreaks.com/topic/185255-approval-system/#findComment-977929 Share on other sites More sharing options...
iSE Posted December 16, 2009 Author Share Posted December 16, 2009 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. Quote Link to comment https://forums.phpfreaks.com/topic/185255-approval-system/#findComment-978425 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.