%PDF- <> %âãÏÓ endobj 2 0 obj <> endobj 3 0 obj <>/ExtGState<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI] >>/Annots[ 28 0 R 29 0 R] /MediaBox[ 0 0 595.5 842.25] /Contents 4 0 R/Group<>/Tabs/S>> endobj ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<> endobj 2 0 obj<>endobj 2 0 obj<>es 3 0 R>> endobj 2 0 obj<> ox[ 0.000000 0.000000 609.600000 935.600000]/Fi endobj 3 0 obj<> endobj 7 1 obj<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI]>>/Subtype/Form>> stream
<?php defined("BASEPATH") or exit("no direct script allowed"); class Pagination_model extends CI_Model{ function __construct(){ parent::__construct(); $this->load->library(array('session','cart','pagination')); $this->load->library(''); $this->load->helper('url'); $this->load->database(); } public function allrecord(){ $this->db->select('DoctorID'); $this->db->from('sh_doctorprofile'); $rs = $this->db->get(); return $rs->num_rows(); } public function data_list($limit,$offset){ $this->db->select('*'); $this->db->from('sh_doctorprofile'); $this->db->order_by('DoctorID','desc'); $this->db->limit($limit,$offset); $rs = $this->db->get(); return $rs->result_array(); } public function allblogrecord(){ $CI = &get_instance(); $this->db2 = $CI->load->database('db2', TRUE); return $this->db2->query("SELECT p.id FROM `wp_posts` AS p INNER JOIN `wp_postmeta` AS pm1 ON p.id = pm1.post_id INNER JOIN `wp_postmeta` AS pm2 ON pm1.meta_value = pm2.post_id AND pm2.meta_key = '_wp_attached_file' AND pm1.meta_key = '_thumbnail_id' ORDER BY p.id DESC ")->num_rows(); } public function allblogcategory($search){ $CI = &get_instance(); $this->db2 = $CI->load->database('db2', TRUE); return $this->db2->query("SELECT ID, post_title, post_name, post_status, post_content, post_date, category_name, category_slug, category_id, CONCAT( '".$uploadDir."','/', thumb.meta_value) as thumbnail, post_type FROM ( SELECT p.ID, p.post_title, p.post_name, p.post_status, p.post_content, p.post_date, p.post_type, MAX(CASE WHEN pm.meta_key = '_thumbnail_id' then pm.meta_value ELSE NULL END) as thumbnail_id, term.name as category_name, term.slug as category_slug, term.term_id as category_id FROM wp_posts as p LEFT JOIN wp_postmeta as pm ON ( pm.post_id = p.ID) LEFT JOIN wp_term_relationships as tr ON tr.object_id = p.ID LEFT JOIN wp_terms as term ON tr.term_taxonomy_id = term.term_id where term.slug='".$search."' and p.post_status='publish' GROUP BY p.ID ORDER BY p.post_date DESC ) as post LEFT JOIN wp_postmeta AS thumb ON thumb.meta_key = '_wp_attached_file' AND thumb.post_id = post.thumbnail_id")->num_rows(); } } ?>