%PDF-1.4
Directory : /var/www/vhosts/lautnusantara.com/httpdocs/web/app/Models/ |
<?php namespace App\Models; use CodeIgniter\Model; class Sitemap_Model extends Model { // protected $table = 'ssn_news_item'; function create() { $builder = $this->db->table('ssn_menu a'); $builder->select('a.*'); $builder->where('a.groupmenu_id', 2); $builder->where('a.typemenu_id', 1); $builder->where('a.published', 1); $builder->where('a.active', 1); $builder->where('a.trash', 0); return $builder->get()->getResultArray(); } public function artikel() { $builder = $this->db->table('ssn_news_items a'); $builder->select('a.id,a.alias,a.publish_up,a.title,a.metakey,a.url_image'); // $builder->join('ssn_news_categories b', 'b.id = a.catid', 'left'); // if($catid!=false){ // $builder->where('a.catid',$catid); // } $builder->where('a.published', 1); $builder->where('a.active', 1); $builder->where('a.trash', 0); $builder->orderBy('a.publish_up', 'DESC'); // $builder->limit(200); return $builder->get()->getResultArray(); } public function produk() { $builder = $this->db->table('ssn_news_items_product a'); $builder->select('a.id,a.alias,a.publish_up,a.title,a.metakey,a.url_image'); $builder->where('a.published', 1); $builder->where('a.active', 1); $builder->where('a.trash', 0); $builder->orderBy('a.publish_up', 'DESC'); // $builder->limit(200); return $builder->get()->getResultArray(); } public function video() { $builder = $this->db->table('ssn_news_items_video a'); $builder->select('a.id,a.alias,a.publish_up,a.title,a.metakey,a.url_image,a.url_video'); $builder->where('a.published', 1); $builder->where('a.active', 1); $builder->where('a.trash', 0); $builder->orderBy('a.publish_up', 'DESC'); // $builder->limit(200); return $builder->get()->getResultArray(); } } ?>