View Single Post
Old 01-16-2009, 04:43 AM   #21 (permalink)
Village Idiot
Wizard
Top Contributor 
 
Village Idiot's Avatar
 
Join Date: Sep 2007
Posts: 1,299
Thanks: 17
Village Idiot is on a distinguished road
Default

Good work, but there is quite a bit that needs to be fixed. Here is what I want done (all small things):
  • Are so many comments really required (especially towards the beginning)? You heavily comment the declarations (which honestly is not necessary) yet leave out comments on the actual processing code.
  • Don't trigger errors when the script can still continue. Some procedure had changed and we are no longer going by exceptions, just return something to indicate failure.
  • Those constants are really not necessary.
  • Why are you assigning $this->query then using it once? Wouldn't it make more sense just to directly run the query?
  • Use parameters for the creation, dont make the programmer assign two class variables than run it.
  • This is a general database programming rule, always always always go by unique ID when possible. Make delete() delete by an ID given in a parameter.
__________________

Village Idiot is offline  
Reply With Quote