[eluser]Joker[/eluser]
[quote author="web-johnny" date="1303519574"]I didn't tested in mssql . I worked with mssql and only with visual studio and linq is good . Without this really I hate MSSQL and I didn't tested on it. I didn't even install it on my computer . Sorry...
But why you use mssql ? Ok if you find the problem please send it to me (just post the code of the model) , so and other people knows about this.
Thank you very much[/quote]
I know i got bad choice when i chosee mssql for this project.
ok the model
function __construct()
{
parent::__construct();
$this->db->query('set names utf8'); === this line made the firts error
}
then i disable it () i didn't made change just // next it
after then this function
function get_field_types_basic_table()
{
$db_field_types = array();
//foreach($this->db->query("SHOW COLUMNS FROM {$this->table_name}")->result() as $db_field_type)
foreach($this->db->query("EXEC Show_Columns {$this->table_name}")->result() as $db_field_type)
{
$type = explode("(",$db_field_type->Type);
$db_type = $type[0];
if(isset($type[1]))
{
$length = substr($type[1],0,-1);
}
else
{
$length = '';
}
$db_field_types[$db_field_type->Field]['db_max_length'] = $length;
$db_field_types[$db_field_type->Field]['db_type'] = $db_type;
$db_field_types[$db_field_type->Field]['db_null'] = $db_field_type->Null;
$db_field_types[$db_field_type->Field]['db_default'] = $db_field_type->Default;
$db_field_types[$db_field_type->Field]['db_extra'] = $db_field_type->Extra;
}
the blue was the originial made change with the red one
i made some procedure on mssql like i sad before
after that
was on lib
line 852
=====
protected function showList($ajax = false)
{
$ci = &get;_instance();
$data = $this->get_common_data();
$data->order_by = $this->order_by;
$data->types = $this->get_field_types();
$data->list = $this->get_list();
$data->list = $this->change_list($data->list , $data->types);
$data->total_results = $this->get_total_results();
$data->columns = $this->get_columns();
$data->primary_key = $this->get_primary_key();
$data->add_url = $this->getAddUrl();
$data->edit_url = $this->getEditUrl();
$data->delete_url = $this->getDeleteUrl();
$data->ajax_list_url = $this->getAjaxListUrl();
$data->ajax_list_info_url = $this->getAjaxListInfoUrl();
$data->unset_add = $this->unset_add;
$data->unset_edit = $this->unset_edit;
$data->unset_delete = $this->unset_delete;
if($data->list === false)
{
throw new Exception('It is impossible to get data. Please check your model and try again.', 13);
$data->list = array();
}
foreach($data->list as $num_row => $row)
{
$data->list[$num_row]->edit_url = $data->edit_url.'/'.$row->{$data->primary_key};
$data->list[$num_row]->delete_url = $data->delete_url.'/'.$row->{$data->primary_key};
}
if(!$ajax)
{
$data->list_view = $this->_theme_view('list.php',$data,true);
$this->_theme_view('list_template.php',$data);
}
else
{
$ci->output->unset_template();
$this->_theme_view('list.php',$data);
}
}
I think ... i was enable read from the model that i was made EXEC show_column
NOt like Show Column on Mysql
ok that was i found on mssql
thank's
maybe other can help this great crud u have made