root 3 лет назад
Родитель
Сommit
ffcb552d6a
2 измененных файлов с 2 добавлено и 2 удалено
  1. 1 1
      common/models/UserNetwork.php
  2. 1 1
      common/models/UserRelation.php

+ 1 - 1
common/models/UserNetwork.php

@@ -100,7 +100,7 @@ class UserNetwork extends \common\components\ActiveRecord
                 WHERE @r <> 0 
             ) t1
         JOIN AR_USER_NETWORK_NEW t2
-        ON t1._id = t2.USER_ID AND t1._id != $userId;";
+        ON t1._id = t2.USER_ID AND t1._id != '".$userId."';";
         $parentUidsArr = \Yii::$app->db->createCommand($sql)->queryAll();
         if (empty($parentUidsArr)) {
             return [];

+ 1 - 1
common/models/UserRelation.php

@@ -95,7 +95,7 @@ class UserRelation extends \common\components\ActiveRecord
                 WHERE @r <> 0 
             ) t1
         JOIN AR_USER_RELATION_NEW t2
-        ON t1._id = t2.USER_ID AND t1._id != $userId;";
+        ON t1._id = t2.USER_ID AND t1._id != '".$userId."';";
         $parentUidsArr = \Yii::$app->db->createCommand($sql)->queryAll();
         if (empty($parentUidsArr)) {
             return [];