Jelajahi Sumber

commit comment info

superbee 8 tahun lalu
induk
melakukan
fdf79a8a6d
1 mengubah file dengan 4 tambahan dan 2 penghapusan
  1. 4 2
      application/user/model/UserComment.php

+ 4 - 2
application/user/model/UserComment.php

@@ -14,8 +14,10 @@ class UserComment extends Model{
 	
 	public function getInfo($user, $type, $page = 0){
 		return $this->db()
-		->field("comment_id s, inputtime t, content c")
-		->where(['user_id'=>$user, "type"=>$type])
+		->alias("c")
+		->field("c.comment_id s, c.inputtime t, c.content c, u.nickname n")
+		->join("gd_user u", "u.id = c.user_id", "LEFT")
+		->where(['c.user_id'=>$user, "c.type"=>$type])
 		->page($page, config('paginate.list_rows'))
 		->order("inputtime DESC")
 		->select();