我正在使用joshcam/PHP-MySQLi-Database-Class库,当我尝试使用数组插入数据时,我在插入函数中出错 错误信息: 致命错误:在第548行的../MysqliDb.php中调用未定义的方法SimpleXMLElement :: getSubQuery()。 有人会告诉我如何解决它吗?
我的代码在这里
$db->where("project_id", $data_project['project_id']);
$tmp = $db->getOne("projects");
if(count($tmp))
{
$data = array( "project_name" => $data_project['project_name'],
"project_url" => $data_project['project_url'],
"project_details" => $data_project['project_details']
);
$db->where('project_id', $data_project['project_id']);
$id = $db->update('projects',$data);
}
else
{
$data = array("project_id" => $data_project['project_id'],
"user_id" => 1,
"project_name" => $data_project['project_name'],
"project_url" => $data_project['project_url'],`enter code here`
"project_details" => $data_project['project_details']
);
$id = $db->insert('projects',$data);