| @@ 115-127 (lines=13) @@ | ||
| 112 | * @param int $msg_id |
|
| 113 | * @return array |
|
| 114 | */ |
|
| 115 | public function Comments($msg_id) |
|
| 116 | { |
|
| 117 | global $xoopsUser, $xoopsDB; |
|
| 118 | $query = 'SELECT C.msg_id_fk, C.com_id, C.uid_fk, C.comment, C.created, U.username FROM ' . $xoopsDB->prefix('smallworld_comments') . ' C, ' . $xoopsDB->prefix('smallworld_user') . " U WHERE C.uid_fk=U.userid AND C.msg_id_fk='" . $msg_id . "' ORDER BY C.com_id ASC "; |
|
| 119 | $result = $xoopsDB->queryF($query); |
|
| 120 | $i = $xoopsDB->getRowsNum($result); |
|
| 121 | while ($row = $xoopsDB->fetchArray($result)) { |
|
| 122 | $data[] = $row; |
|
| 123 | } |
|
| 124 | if (!empty($data)) { |
|
| 125 | return $data; |
|
| 126 | } |
|
| 127 | } |
|
| 128 | ||
| 129 | /** |
|
| 130 | * @Get user image based on uid |
|
| @@ 120-132 (lines=13) @@ | ||
| 117 | * @param int $msg_id |
|
| 118 | * @return array |
|
| 119 | */ |
|
| 120 | public function Comments($msg_id) |
|
| 121 | { |
|
| 122 | global $xoopsUser, $xoopsDB; |
|
| 123 | $query = 'SELECT C.msg_id_fk, C.com_id, C.uid_fk, C.comment, C.created, U.username FROM ' . $xoopsDB->prefix('smallworld_comments') . ' C, ' . $xoopsDB->prefix('smallworld_user') . " U WHERE C.uid_fk=U.userid AND C.msg_id_fk='" . $msg_id . "' ORDER BY C.com_id ASC "; |
|
| 124 | $result = $xoopsDB->queryF($query); |
|
| 125 | $i = $xoopsDB->getRowsNum($result); |
|
| 126 | while ($row = $xoopsDB->fetchArray($result)) { |
|
| 127 | $data[] = $row; |
|
| 128 | } |
|
| 129 | if (!empty($data)) { |
|
| 130 | return $data; |
|
| 131 | } |
|
| 132 | } |
|
| 133 | ||
| 134 | /** |
|
| 135 | * @Get user image based on uid |
|