Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class Indonesia_model extends CI_Model {
- function __construct() { parent::__construct(); }
- function getAllIndonesia() {
- $this->db->from("tabel_indonesia");
- return $this->db->get();
- }
- function remove_checked_indonesia() {
- $action = $this->input->post('hapus');
- if ($action) {
- $delete = $this->input->post('item');
- for ($i=0; $i < count($delete) ; $i++) {
- $this->db->where('id', $delete[$i]);
- $this->db->delete('tabel_indonesia');
- }
- }
- }
- function link_photo()
- {
- $action = $this->input->post('hapus');
- if ($action) {
- $delete = $this->input->post('item');
- for ($i=0; $i < count($delete) ; $i++) {
- $this->db->where('id', $delete[$i]);
- $query = $getData = $this->db->get('tabel_indonesia');
- if($getData->num_rows() > 0)
- return $query;
- else
- return null;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement