mirror of
https://github.com/maxpozdeev/mytinytodo.git
synced 2026-03-11 08:55:27 +00:00
more info on sqlite query error
This commit is contained in:
parent
dca80918e2
commit
f836683a9c
1 changed files with 2 additions and 2 deletions
|
|
@ -22,7 +22,7 @@ class DatabaseResult_Sqlite3
|
|||
$r = $this->parent->dbh->exec($query);
|
||||
if($r === false) {
|
||||
$ei = $this->parent->dbh->errorInfo();
|
||||
throw new Exception($ei[2]);
|
||||
throw new Exception("SQLSTATE[$ei[0]] [$ei[1]] $ei[2]");
|
||||
}
|
||||
$this->parent->affected = $r;
|
||||
}
|
||||
|
|
@ -31,7 +31,7 @@ class DatabaseResult_Sqlite3
|
|||
$this->q = $this->parent->dbh->query($query);
|
||||
if(!$this->q) {
|
||||
$ei = $this->parent->dbh->errorInfo();
|
||||
throw new Exception($ei[2]);
|
||||
throw new Exception("SQLSTATE[$ei[0]] [$ei[1]] $ei[2]");
|
||||
}
|
||||
$this->parent->affected = $this->q->rowCount();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue