Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Error in commit
01-24-2014, 09:03 PM, (This post was last modified: 01-24-2014, 09:21 PM by Forums.)
#1
Error in commit
There was a commit done last night under the commit message "Tim: selection of purchase orders by order date". Apart from the fact that there is a lot of stuff in there that is unrelated to this commit message there is an error in the sql file upgrade4.11.2-4.11.3.sql. Line 4 should read

ALTER TABLE `emailsettings` CHANGE `username` `username` VARCHAR( 50 ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL;

as all sql statements should end with a semi colon.

Thanks
Tim
Another error in this commit (again a script that has nothing to do with the commit message - perhaps all these files with errors were accidentally committed??) is in the script SelectOrderItems.php. The assignment statement

$QuantityAlreadyDelivered = $_SESSION['Items'.$identifier]->Some_Already_Delivered($_GET['Delete']);

has been removed, but that variable is then used in line 1089 and so will throw an error.

Thanks
Tim
Reply
01-25-2014, 06:30 AM,
#2
RE: Error in commit
Thanks Tim - appreciate the review
Phil Daintree
webERP Admin
Logic Works Ltd
http://www.logicworks.co.nz
Reply
01-25-2014, 07:37 PM,
#3
RE: Error in commit
It seems to me that the adherence to the coding guidelines has become very lax recently. When I was admin I tried to be rigorous about this.

For instance it has always been the guideline the SQL keywords should be upper case in order to make the SQL more readable. In a commit last night we have two sql statements one after the other that read:

alter table stockcatproperties drop foreign key stockcatproperties_ibfk_3;
ALTER TABLE `emailsettings` CHANGE `username` `username` VARCHAR( 50 ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL;

as you can see the first uses lower case for SQL keywords, and the second uses upper case.

This is something I have always felt strongly about, and it would be a shame if now others are running the project these standards are being dropped. There have been many such examples recently.

Tim
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)