You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
information-system/author/models/infoContents_model.php

30 lines
677 B
PHTML

<?php
class InfoContents_model extends CI_Model
{
var $insert_id = -1;
function __construct()
{
parent::__construct();
$this->HT = $this->load->database('HT', TRUE);
}
public function get_ic_contents_by_list($ic_id_list)
{
$ic_id_list=trim($ic_id_list);
$ic_id_list.=0;
$sql="SELECT * from infoContents where ic_id in ($ic_id_list) order by charindex(','+ltrim(ic_id)+',', ',$ic_id_list,')";
$query=$this->HT->query($sql);
if ($query->result())
{
$row = $query->result();
return $row;
}
else
{
return FALSE;
}
}
}