2017-04-26 14 views
0

私はcodeigniterプロジェクトにリンクされたテーブルをMySQL dBで使用しています。私は、フィールドの「aboutus_detail」のvarchar [1000]のデータ型を保持しています。このフィールドでは、長い節を格納しています。私はテーブルからデータを取得しようとしている間、私はフィールド 'aboutus_detail'に格納されているデータ全体を取得しませんでした。MySQLテーブルから全データが取得されない

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

The data stored for the 'aboutus_detail'

I)は、(ます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 
      ) 
    ) 

私は 'テキスト'としてデータ型を試しました。私が全体の通路を取り出せるように道を提案してください。

マイコントローラー:

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; ?> 
+0

はすべて保存されますか? –

+1

最大4つのストアであるデータ型 'LONGTEXT'を使用しようとしています –

+0

コードを追加します –

答えて

0

.......モデルでこのコードを試します
class Aboutus_model extends CI_Model 
    { 
     public function about_us_page() 
     { 

    $data = $this->db->query('select * from ins_aboutus'); 
     return $data->result(); 

    } 

} 
関連する問題