34 lines
968 B
PHP
34 lines
968 B
PHP
<?php
|
|
defined('BASEPATH') OR exit('No direct script access allowed');
|
|
|
|
/**
|
|
* Qna model class
|
|
*/
|
|
|
|
class Qna_model extends MY_Model
|
|
{
|
|
|
|
/**
|
|
* 테이블명
|
|
*/
|
|
public $_table = 'qna';
|
|
|
|
/**
|
|
* 사용되는 테이블의 프라이머리키
|
|
*/
|
|
public $primary_key = 'qna_id'; // 사용되는 테이블의 프라이머리키
|
|
|
|
function __construct()
|
|
{
|
|
parent::__construct();
|
|
}
|
|
|
|
|
|
public function get_admin_list($limit = '', $offset = '', $where = '', $like = '', $findex = '', $forder = '', $sfield = '', $skeyword = '', $sop = 'OR')
|
|
{
|
|
$select = 'qna.*, user.user_id, user.user_username, user.user_is_admin, user.user_icon';
|
|
$join[] = array('table' => 'user', 'on' => 'qna.user_id = user.user_id', 'type' => 'inner');
|
|
$result = $this->_get_list_common($select, $join, $limit, $offset, $where, $like, $findex, $forder, $sfield, $skeyword, $sop);
|
|
return $result;
|
|
}
|
|
} |