2011-07-25 11 views

答えて

0

を見ることができると思う:

function foo() 
{ 
    if(! empty($_POST)) 
    { 
     $hello = serialize($_POST['hello']); 
     // You can do your database abstraction here, but is better to have these in your model 
     // Btw, by using CI AR, all values are escaped automatically producing safer queries. 
     $this->db->insert('some_table', array('hello' => $hello)); 
    } 
    else 
    { 
     // do something 
    } 
} 
0

シンプル:

$sSerialized = serialize($sData); 
INSERT INTO table SET field = ".myqsl_real_escape_string($sSerialized); 

私もあなたのデータベースにシリアライズされたデータを格納アドバイスではないでしょう。 CodeIgniterの特定のセットアップについては

、私はあなたがそれは単にのような...

コントローラhttp://codeigniter.com/user_guide/database/queries.html

+0

CodeIgniterのシリアル化を持っていません。あなたの提案は何ですか? –

関連する問題