我收到以下错误:
SQLSTATE [HY000]:常规错误:2013查询期间与MySQL服务器的连接丢失
执行以下代码时:
$this->query("SET SQL_BIG_SELECTS=1");
$joins = array(
array(
'table' => 'items',
'alias' => 'Item',
'type' => 'LEFT',
'conditions' => array(
'Item.TransactionID = Notification.TransactionID',
'Item.ItemID = Notification.ItemId'
)
),
array(
'table' => 'buyers',
'alias' => 'Buyer',
'type' => 'LEFT',
'conditions' => array(
'Buyer.OrderId = Item.OrderId'
)
)
);
App::import('Component', 'SessionComponent');
$this->Session = new SessionComponent(new ComponentCollection());
$userSession = $this->Session->read("SESSION_USER");
$fetchrecord = $this->find(
'all',
array(
'order' => 'Notification.CommentTime DESC',
'conditions' => array(
'Notification.KiOuiUserId' => $userSession['id']
),
'joins' => $joins,
'fields' => array(
'Notification.CommentTime',
'Notification.ProcessedSellerNotificationTimeStamp',
'Notification.ProcessedSellerNotificationComment',
'Notification.ProcessedBuyerNotificationTimeStamp',
'Notification.ProcessedBuyerNotificationComment',
'Notification.ProcessedLeaveFeedbackTimeStamp',
'Notification.ProcessedRespondToFeedbackComment',
'Notification.ProcessedRespondToFeedbackTimeStamp',
'Notification.ProcessedLeaveFeedbackComment',
'Notification.SellerId',
'Notification.ItemId',
'Notification.TransactionID',
'Notification.TimeStamp',
'Item.OrderId',
'Item.TransactionID',
'Item.Title',
'Item.GalleryUrl',
'Item.BuyerUserID',
'Buyer.Email',
'Buyer.Name',
'Buyer.Street1',
'Buyer.CityName',
'Buyer.StateOrProvince',
'Buyer.Country',
'Buyer.PostalCode',
'Buyer.Phone',
'Buyer.OrderId'
),
'limit' => 1000
)
);
if ($fetchrecord)
{
return $fetchrecord;
}
以上查询工作正常的专用托管服务器,并在共享主机上给出错误。任何人都能告诉我解决方案吗?