Login   Register  
PHP Classes
elePHPant
Icontem

Usage Analysis

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us

      Keep edit and delete database archive  >  All threads  >  Usage Analysis  >  (Un) Subscribe thread alerts  
Subject:Usage Analysis
Summary:This needs a lot of work
Messages:2
Author:Darren Conyard
Date:2013-01-09 22:55:26
Update:2013-03-02 13:59:11
 

  1. Usage Analysis   Reply   Report abuse  
Picture of Darren Conyard
Darren Conyard
2013-01-09 22:55:26
Hi majid,

There are a couple of issues I need to tell you about this class, I have used this class with the sql file that you provided and there are a couple of things wrong with it.

You have chosen to start incrementing the table with an id starting at 40, when as your id in your script is hard coded to 1 this should really be 1.

On inserting records this always fails as the edited_id and deleted_time fields are not mentioned in your insert function and they cannot be null values either so this function will always fail.

The edit function of this class tries to insert and then edit the record in one step, when really you should have a separate function for inserting and a separate function for editing. The syntax for update queries and insert queries is different and because of this this function always fails. Also the user just sees a blank screen when this happens with no message about why this fails.

The get delete archive function works well you can see the fields that have been deleted and thats ok.

but the geteditarchivedata function always fails as you cannot edit records with this script and the selected data function always returns boolean(false) even when there are records in the db.

As a side note it is advised that you use mysqli or PDO for connecting to databases as mysql_connect etc. will become obsolete in future additions of PHP.

I hope this helps you to address some fundamental issues with this class.

Best Regards

Darren Conyard

  2. Re: Usage Analysis   Reply   Report abuse  
Picture of majid ramzani
majid ramzani
2013-03-02 13:59:11 - In reply to message 1 from Darren Conyard
Hi Darren.
Thank you for your advises , actually i have the same idea about that and that was a hard code , but that class was my first one about the "keep DB archive" idea ,
Therefor i've tried and found a better way to do that , and also it has more advantages such Undo function !
I'm very busy these days , but i hope to complete that class and upload it here to everyone can use it.