From 6085677e67e20c5f28f6aeab7d1e0bbc5a6da3bf Mon Sep 17 00:00:00 2001 From: ghost Date: Fri, 11 Aug 2023 00:35:03 +0300 Subject: [PATCH] upgrade yggstate db query --- src/library/yggstate.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/library/yggstate.php b/src/library/yggstate.php index 4669cd6..39db984 100644 --- a/src/library/yggstate.php +++ b/src/library/yggstate.php @@ -66,10 +66,10 @@ class YGGstate { $query = $this->_db->prepare('SELECT * FROM `peer` HAVING ( - SELECT `peerRemote`.`uptime` - FROM `peerRemote` - WHERE `peerRemote`.`peerId` = `peer`.`peerId` - ORDER BY `timeAdded` DESC + SELECT `peerSession`.`uptime` + FROM `peerSession` + WHERE `peerSession`.`peerId` = `peer`.`peerId` + ORDER BY `peerSession`.`peerSessionId` DESC LIMIT 1 ) >= ?');