function &get($id) { $comment = false; $id = intval($id); if ($id > 0) { $sql = 'SELECT * FROM '.$this->db->prefix('xoopscomments').' WHERE com_id='.$id; if (!$result = $this->db->query($sql)) { return $comment; } $numrows = $this->db->getRowsNum($result); if ($numrows == 1) { $comment = new XoopsComment(); $comment->assignVars($this->db->fetchArray($result)); } } return $comment; }