不从MySQL表中检索整个数据

时间:2017-04-26 06:27:37

标签: mysql codeigniter

我有一个MySQL dB表,它链接到我的codeigniter项目。我为字段' aboutus_detail'保留了varchar [1000]的数据类型,其中我存储了一个长段落。当我尝试从表格中检索数据时,我没有将整个数据存储在字段中' aboutus_detail'。

The Length of the 'aboutus_detail' is varchar[1000]

The data stored for the 'aboutus_detail'

我使用过print_r()。我只得到以下输出

Array (
 [0] => Array (
      [aboutus_id] => 1 
      [aboutus_title] => India Nirman Sangh 
      [aboutus_detail] => Since 2005, we have been working in the hills around Kodaikanal and Palaniin Tamilnadu, India.Through these twelve years, we have workedtowards women’s development in the towns on the hills,and in Kodaikanal and Palani towns. Winning th 
      [aboutus_image] => files/slide1.jpg 
              )
      )

我尝试使用数据类型作为' text'。建议一种方法,以便我可以检索整个段落。

我的控制器:

class Welcome extends My_Controller {

    public function index()
{
    $this->load->model('aboutus_model');
    $data['list'] = $this->aboutus_model->about_us_page();
    $this->load->view('about_us/about',$data);
    }
}

我的模特:

class Aboutus_model extends CI_Model 
{
    public function about_us_page()
    {
        $data = $this->db->query('select * from ins_aboutus')->result_array();
        return $data;
    }

}

我的观点:

<?php print_r($list); exit; ?>

1 个答案:

答案 0 :(得分:0)

在模型中尝试使用此代码.......

  holder.costcode_relative.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(final View view) {

            // code here to set the radioButton checked
            }
        });