mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-11 12:11:19 +00:00
add missing backticks around identifiers in sql statements
This commit is contained in:
parent
6a3bf35739
commit
a65f4d56b5
|
@ -2183,14 +2183,14 @@ class SeedDMS_Core_DMS {
|
|||
|
||||
return $resArr;
|
||||
case 'docspermonth':
|
||||
$queryStr = "select *, count(`key`) as total from (select ".$this->db->getDateExtract("date", '%Y-%m')." as `key` from tblDocuments) a group by `key` order by `key`";
|
||||
$queryStr = "select *, count(`key`) as total from (select ".$this->db->getDateExtract("date", '%Y-%m')." as `key` from `tblDocuments`) a group by `key` order by `key`";
|
||||
$resArr = $this->db->getResultArray($queryStr);
|
||||
if (!$resArr)
|
||||
return false;
|
||||
|
||||
return $resArr;
|
||||
case 'docsaccumulated':
|
||||
$queryStr = "select *, count(`key`) as total from (select ".$this->db->getDateExtract("date")." as `key` from tblDocuments) a group by `key` order by `key`";
|
||||
$queryStr = "select *, count(`key`) as total from (select ".$this->db->getDateExtract("date")." as `key` from `tblDocuments`) a group by `key` order by `key`";
|
||||
$resArr = $this->db->getResultArray($queryStr);
|
||||
if (!$resArr)
|
||||
return false;
|
||||
|
|
|
@ -2137,7 +2137,7 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */
|
|||
|
||||
/* No need to add entries for new version because the status log
|
||||
* will generate an entry as well.
|
||||
$queryStr = "SELECT * FROM tblDocumentContent WHERE document = " . $this->_id;
|
||||
$queryStr = "SELECT * FROM `tblDocumentContent` WHERE `document` = " . $this->_id;
|
||||
$resArr = $db->getResultArray($queryStr);
|
||||
if (is_bool($resArr) && $resArr == false)
|
||||
return false;
|
||||
|
@ -2673,7 +2673,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */
|
|||
if (1 || !isset($this->_reviewStatus)) {
|
||||
/* First get a list of all reviews for this document content */
|
||||
$queryStr=
|
||||
"SELECT reviewID FROM tblDocumentReviewers WHERE `version`='".$this->_version
|
||||
"SELECT reviewID FROM `tblDocumentReviewers` WHERE `version`='".$this->_version
|
||||
."' AND `documentID` = '". $this->_document->getID() ."' ";
|
||||
$recs = $db->getResultArray($queryStr);
|
||||
if (is_bool($recs) && !$recs)
|
||||
|
|
|
@ -172,7 +172,7 @@ class SeedDMS_Core_Group { /* {{{ */
|
|||
|
||||
$queryStr = "SELECT `tblUsers`.* FROM `tblUsers` ".
|
||||
"LEFT JOIN `tblGroupMembers` ON `tblGroupMembers`.`userID`=`tblUsers`.`id` ".
|
||||
"WHERE `tblGroupMembers`.`groupID` = '". $this->_id ."' AND tblGroupMembers.manager = 1";
|
||||
"WHERE `tblGroupMembers`.`groupID` = '". $this->_id ."' AND `tblGroupMembers`.`manager` = 1";
|
||||
$resArr = $db->getResultArray($queryStr);
|
||||
if (is_bool($resArr) && $resArr == false)
|
||||
return false;
|
||||
|
|
|
@ -658,8 +658,8 @@ class SeedDMS_Core_User { /* {{{ */
|
|||
}
|
||||
|
||||
// TODO : update document status if reviewer/approver has been deleted
|
||||
// "DELETE FROM tblDocumentApproveLog WHERE userID = " . $this->_id;
|
||||
// "DELETE FROM tblDocumentReviewLog WHERE userID = " . $this->_id;
|
||||
// "DELETE FROM `tblDocumentApproveLog` WHERE `userID` = " . $this->_id;
|
||||
// "DELETE FROM `tblDocumentReviewLog` WHERE `userID` = " . $this->_id;
|
||||
|
||||
|
||||
$reviewStatus = $this->getReviewStatus();
|
||||
|
|
Loading…
Reference in New Issue
Block a user