Post Reply 
 
Thread Rating:
  • 0 Votes - 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.)
Post: #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
Visit this user's website Find all posts by this user
Quote this message in a reply
01-25-2014, 06:30 AM
Post: #2
RE: Error in commit
Thanks Tim - appreciate the review

Phil Daintree
webERP Admin
Logic Works Ltd
http://www.logicworks.co.nz
Visit this user's website Find all posts by this user
Quote this message in a reply
01-25-2014, 07:37 PM
Post: #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
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)