function _getsBythreadIds($threadIds, $tmsgsTableName) { $this->_tableName2 = $tmsgsTableName ? $tmsgsTableName : $this->_tableName2; $threadIds = is_array($threadIds) ? CLOUDWIND_SECURITY_SERVICE::sqlImplode($threadIds) : $threadIds; $query = $this->_db->query("SELECT t.*,th.content FROM " . $this->_tableName . " t left join " . $this->_tableName2 . " th on t.tid=th.tid WHERE t.tid in(" . $threadIds . ") ORDER BY t.postdate DESC"); return $this->_getAllResultFromQuery($query); }
function getsByPostIds($postIds, $table) { if (!$this->_checkTable($table)) { return false; } $postIds = is_array($postIds) ? CLOUDWIND_SECURITY_SERVICE::sqlImplode($postIds) : $postIds; $query = $this->_db->query("SELECT * FROM " . $table . " p WHERE p.pid in(" . $postIds . ") ORDER BY p.postdate DESC"); return $this->_getAllResultFromQuery($query); }
function getsByForumIds($forumIds) { $forumIds = is_array($forumIds) ? CLOUDWIND_SECURITY_SERVICE::sqlImplode($forumIds) : $forumIds; $query = $this->_db->query("SELECT fid,name,descrip FROM " . $this->_tableName . " WHERE fid in(" . $forumIds . ")"); return $this->_getAllResultFromQuery($query); }
function sqlMulti($array, $strip = true) { if (!CLOUDWIND_SECURITY_SERVICE::isArray($array)) { return ''; } $str = ''; foreach ($array as $val) { if (!empty($val) && CLOUDWIND_SECURITY_SERVICE::isArray($val)) { $str .= ($str ? ', ' : ' ') . '(' . CLOUDWIND_SECURITY_SERVICE::sqlImplode($val, $strip) . ') '; } } return $str; }
function getsByUserIds($userId) { $userId = is_array($userId) ? CLOUDWIND_SECURITY_SERVICE::sqlImplode($userId) : $userId; $query = $this->_db->query("SELECT uid,username,regdate FROM " . $this->_tableName . " WHERE uid in(" . $userId . ")"); return $this->_getAllResultFromQuery($query); }
function getsAttachsIds($aids) { $aids = is_array($aids) ? CLOUDWIND_SECURITY_SERVICE::sqlImplode($aids) : $aids; $query = $this->_db->query("SELECT * FROM " . $this->_tableName . " WHERE aid in(" . $aids . ")"); return $this->_getAllResultFromQuery($query); }
function getsByDids($dids) { $dids = is_array($dids) ? CLOUDWIND_SECURITY_SERVICE::sqlImplode($dids) : $dids; $query = $this->_db->query("SELECT did,uid,username,subject,content,postdate FROM " . $this->_tableName . " WHERE did in(" . $dids . ")"); return $this->_getAllResultFromQuery($query); }
function _getImplodeString($arr, $strip = true) { return CLOUDWIND_SECURITY_SERVICE::sqlImplode($arr, $strip); }
function getsByColonyIds($ids) { $ids = is_array($ids) ? CLOUDWIND_SECURITY_SERVICE::sqlImplode($ids) : $ids; $query = $this->_db->query("SELECT id,classid,cname FROM " . $this->_tableName . " WHERE id in(" . $ids . ")"); return $this->_getAllResultFromQuery($query); }