我正在使用joshcam/PHP-MySQLi-Database-Class库,当我尝试使用数组插入数据时,插入函数出错 错误消息:致命错误:调用未定义的方法 SimpleXMLElement::getSubQuery() in .. /MysqliDb.php 在第 548 行。有人能告诉我如何解决吗?
我的代码在这里
$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);