【发布时间】:2013-12-13 15:36:26
【问题描述】:
当我运行下面的代码时
$data = array(
'name' => $this->input->post('name'),
'recipe' => $this->input->post('recipe'),
'category_id' => $category_id,
'recipe_elements' => $this->input->post('recipe_elements'),
'country' => $this->input->post('country'),
'video' => $this->input->post('video'),
'img' => $img_name,
'vote' => $this->input->post('oy')
);
$this->db->insert('recipes',$data);
我收到此错误
遇到 PHP 错误 严重性:4096
消息:stdClass 类的对象无法转换为字符串 文件名:mysql/mysql_driver.php 行号:552 错误号:1064您的 SQL 语法有错误;查看与您的 MySQL 服务器版本相对应的手册,了解在 ' ' 附近使用的正确语法
我已经尝试更改输入值,但仍然出现相同的错误。任何帮助,将不胜感激。我该如何解决这个问题?
【问题讨论】:
标签: php mysql database codeigniter