fix some sql statements to work with mysql 5.7.5 (Closes: #273)

This commit is contained in:
Uwe Steinmann 2016-07-04 09:11:50 +02:00
parent ec2d983bb4
commit 0afbcc73d8

View File

@ -308,7 +308,7 @@ class SeedDMS_Core_DatabaseAccess {
"MAX(`tblDocumentReviewLog`.`reviewLogID`) AS `maxLogID` ".
"FROM `tblDocumentReviewLog` ".
"GROUP BY `tblDocumentReviewLog`.`reviewID` ".
"ORDER BY `tblDocumentReviewLog`.`reviewLogID`";
"ORDER BY `maxLogID`";
break;
default:
$queryStr = "CREATE TEMPORARY TABLE IF NOT EXISTS `ttreviewid` (PRIMARY KEY (`reviewID`), INDEX (`maxLogID`)) ".
@ -316,7 +316,7 @@ class SeedDMS_Core_DatabaseAccess {
"MAX(`tblDocumentReviewLog`.`reviewLogID`) AS `maxLogID` ".
"FROM `tblDocumentReviewLog` ".
"GROUP BY `tblDocumentReviewLog`.`reviewID` ".
"ORDER BY `tblDocumentReviewLog`.`reviewLogID`";
"ORDER BY `maxLogID`";
}
if (!$this->_ttreviewid) {
if (!$this->getResult($queryStr))
@ -341,7 +341,7 @@ class SeedDMS_Core_DatabaseAccess {
"MAX(`tblDocumentApproveLog`.`approveLogID`) AS `maxLogID` ".
"FROM `tblDocumentApproveLog` ".
"GROUP BY `tblDocumentApproveLog`.`approveID` ".
"ORDER BY `tblDocumentApproveLog`.`approveLogID`";
"ORDER BY `maxLogID`";
break;
default:
$queryStr = "CREATE TEMPORARY TABLE IF NOT EXISTS `ttapproveid` (PRIMARY KEY (`approveID`), INDEX (`maxLogID`)) ".
@ -349,7 +349,7 @@ class SeedDMS_Core_DatabaseAccess {
"MAX(`tblDocumentApproveLog`.`approveLogID`) AS `maxLogID` ".
"FROM `tblDocumentApproveLog` ".
"GROUP BY `tblDocumentApproveLog`.`approveID` ".
"ORDER BY `tblDocumentApproveLog`.`approveLogID`";
"ORDER BY `maxLogID`";
}
if (!$this->_ttapproveid) {
if (!$this->getResult($queryStr))
@ -374,7 +374,7 @@ class SeedDMS_Core_DatabaseAccess {
"MAX(`tblDocumentStatusLog`.`statusLogID`) AS `maxLogID` ".
"FROM `tblDocumentStatusLog` ".
"GROUP BY `tblDocumentStatusLog`.`statusID` ".
"ORDER BY `tblDocumentStatusLog`.`statusLogID`";
"ORDER BY `maxLogID`";
break;
default:
$queryStr = "CREATE TEMPORARY TABLE IF NOT EXISTS `ttstatid` (PRIMARY KEY (`statusID`), INDEX (`maxLogID`)) ".
@ -382,7 +382,7 @@ class SeedDMS_Core_DatabaseAccess {
"MAX(`tblDocumentStatusLog`.`statusLogID`) AS `maxLogID` ".
"FROM `tblDocumentStatusLog` ".
"GROUP BY `tblDocumentStatusLog`.`statusID` ".
"ORDER BY `tblDocumentStatusLog`.`statusLogID`";
"ORDER BY `maxLogID`";
}
if (!$this->_ttstatid) {
if (!$this->getResult($queryStr))