find ( array ( 'where' => 'cid=' . $cid, 'asArray' => TRUE ) ); } function getColumnByIdList($cid = 0) { return $this->find ( array ( 'where' => 'cid in ( ' . $cid.' )', 'asArray' => TRUE ) ); } function getColumnListByType($c_type=1){ $sql = "select * from " . $this->_table . " WHERE `c_type` =" .$c_type; $query = Doo::db ()->query ( $sql ); $result = $query->fetchAll (); return $result; } function getColumnList($data = array(), $condition = "", $limit = ""){ foreach ( $data as $key => $value ) { if (is_numeric ( $value )) $condition .= " and " . $key . " = " . $value; else $condition .= " and " . $key . " like '%" . $value . "%' "; } $condition = ' where 1 ' . $condition . $limit; $sql = "select * from " . $this->_table . $condition; $query = Doo::db ()->query ( $sql ); $result = $query->fetchAll (); return $result; } function deleteColumnByIdList($id){ $id = implode ( ",", $id ); $sql = "delete from " . $this->_table . " where cid in ( " . $id . " ) and c_type !=1"; Doo::db ()->query ( $sql ); } } ?>