<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Model_movie extends My_Model
{
public $table_name = 'tb_content_movie';
public $primary_key= 'id';
public function __construct()
{
parent::__construct();
$this->load->helper('uploadimage');
$this->config->load('path_upload', TRUE);
}
function getList($fieldDevice = false, $fieldTable, $ignoreActive = false)
{
shall::getList('iphone', 'tb_content_movie', true);
echo shall->$refobjtb;
}
}
?>
shall.php
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Shall
{
public $table_name = '';
public $refobjtb = '';
private static $ci;
function __construct()
{
self::$ci =& get_instance();
}
/**
* [getList list title each shall]
* @param string $fieldDevice [device name for where scope]
* @param string $fieldRefTable [reference table name for where scope]
* @param boolean $ignoreActive [default = false is get device active, true is get device active and inactive]
* @return array object [description]
*/
static function getList($fieldDevice = null, $fieldRefTable = null, $ignoreActive = false)
{
self::setRefobjtb($fieldRefTable);
$sql = '......................'
return self::$ci->db->query($sql)->result();
}
protected function setRefobjtb($tbName = '')
{
$this->$refobjtb = $tbName;
}
}
?>
รันแล้วเกิดเออเร่อตามนี้ครับ
Using $this when not in object context.......