mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-12 04:31:32 +00:00
create temp table ttreceiptid before using it
This commit is contained in:
parent
6ad630edf4
commit
795ca98b8f
|
@ -3894,6 +3894,9 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */
|
||||||
* of records and join the other tables. ttreceiptid join tblDocumentRecipients
|
* of records and join the other tables. ttreceiptid join tblDocumentRecipients
|
||||||
* is faster than tblDocumentRecipients join ttreceiptid
|
* is faster than tblDocumentRecipients join ttreceiptid
|
||||||
*/
|
*/
|
||||||
|
if (!$db->createTemporaryTable("ttreceiptid")) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
$queryStr=
|
$queryStr=
|
||||||
"SELECT `tblDocumentRecipients`.*, `tblDocumentReceiptLog`.`receiptLogID`, `tblDocumentReceiptLog`.`status`, `tblDocumentReceiptLog`.`comment`, `tblDocumentReceiptLog`.`date`, `tblDocumentReceiptLog`.`userID`, `tblUsers`.`fullName`, `tblGroups`.`name` FROM `ttreceiptid` LEFT JOIN `tblDocumentRecipients` ON `tblDocumentRecipients`.`receiptID`=`ttreceiptid`.`receiptID` LEFT JOIN `tblDocumentReceiptLog` ON `ttreceiptid`.`maxLogID`=`tblDocumentReceiptLog`.`receiptLogID` LEFT JOIN `tblUsers` ON `tblDocumentRecipients`.`required`=`tblUsers`.`id` LEFT JOIN `tblGroups` ON `tblDocumentRecipients`.`required`=`tblGroups`.`id` WHERE `version`='".$this->_version
|
"SELECT `tblDocumentRecipients`.*, `tblDocumentReceiptLog`.`receiptLogID`, `tblDocumentReceiptLog`.`status`, `tblDocumentReceiptLog`.`comment`, `tblDocumentReceiptLog`.`date`, `tblDocumentReceiptLog`.`userID`, `tblUsers`.`fullName`, `tblGroups`.`name` FROM `ttreceiptid` LEFT JOIN `tblDocumentRecipients` ON `tblDocumentRecipients`.`receiptID`=`ttreceiptid`.`receiptID` LEFT JOIN `tblDocumentReceiptLog` ON `ttreceiptid`.`maxLogID`=`tblDocumentReceiptLog`.`receiptLogID` LEFT JOIN `tblUsers` ON `tblDocumentRecipients`.`required`=`tblUsers`.`id` LEFT JOIN `tblGroups` ON `tblDocumentRecipients`.`required`=`tblGroups`.`id` WHERE `version`='".$this->_version
|
||||||
."' AND `documentID` = '". $this->_document->getID() ."' ";
|
."' AND `documentID` = '". $this->_document->getID() ."' ";
|
||||||
|
|
Loading…
Reference in New Issue
Block a user