function deleteQBByCourseId($courseId) { $list = Comman::convertArrayToSingle($this->getList(array('id'), $courseId), 'id'); foreach ($list as $item) { $this->delete($item); } return true; }
function getNEList($type = null, $limit = null) { $columns = array(0 => 'uid'); $wh = "uid!=0 "; if ($type != null) { $wh = "type='{$type}' "; } $wh .= "ORDER BY `date` DESC"; if ($limit != null) { $wh .= " LIMIT {$limit}"; } return Comman::convertArrayToSingle($this->db->getDataGrid($this->table, $columns, $wh), 'uid'); }
function getReferers() { $where = "admin!=1 GROUP BY `ref`"; return Comman::convertArrayToSingle($this->db->getDataGrid($this->table, array('ref'), $where), 'ref'); }