Home > Database > Mysql Tutorial > 关于dbv的runselectedrevisions没有反应

关于dbv的runselectedrevisions没有反应

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-07 16:02:55
Original
1271 people have browsed it

当revisions下的SQL语句有异常的时候,比如删除不存在的列,前台没有反应。 其实是有反应的,只不过返回来的数据不是JSON数据,不能被前端解析,修改pdo.php文件的public function query($sql) public function query($sql) { return $this-_connection-quer

当revisions下的SQL语句有异常的时候,比如删除不存在的列,前台没有反应。 其实是有反应的,只不过返回来的数据不是JSON数据,不能被前端解析,修改pdo.php文件的public function query($sql)

public function query($sql)
{
return $this->_connection->query($sql);
}

修改为:
public function query($sql)
{
try{
return $this->_connection->query($sql);
}
catch(Exception $e) {
throw new DBV_Exception($e->getMessage(), (int)$e->getCode());
}
}

这个bug耗了1整晚的时间!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template