CodeIgniter Forums

Full Version: insert code "/"
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
CI4
Code:
$code = "my code \'CodeIgniter\Autoloader\'";
       $this->db->table('test')->insert([
           'text' => $code
       ]);
error:
databse: my code 'CodeIgniterAutoloader'



CI3
PHP Code:
$code "my code \'CodeIgniter\Autoloader\'";
 
       $this->db->insert('test', [
 
           'text' => $code
        
]); 

[font=Arial, 宋体,][font=arial, 宋体]That's right.[/font][/font]
I've created an issue for this in CodeIgniter 4 repo: https://github.com/bcit-ci/CodeIgniter4/issues/302