관리-도구
편집 파일: Gallerymodel.php
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); class Gallerymodel extends CI_Model { public function __construct() { parent::__construct(); $this->load->library('session'); } public function all(){ $this->db->select("*"); $this->db->from("gallery"); $this->db->where(["gallery_status"=>1]); $this->db->order_by("gallery_displayorder,gallery_id DESC"); $result = $this->db->get(); return $result->result(); } }