1
0
mirror of https://github.com/dg/dibi.git synced 2025-08-14 01:54:08 +02:00

fixed some bugs

This commit is contained in:
David Grudl
2007-11-12 14:35:55 +00:00
parent 46850aa588
commit d19eb5b815
8 changed files with 47 additions and 43 deletions

View File

@@ -251,7 +251,7 @@ class DibiMySqliDriver extends NObject implements DibiDriverInterface
public function rowCount()
{
if (!$this->buffered) {
throw new BadMethodCallException(__METHOD__ . ' is not allowed for unbuffered queries');
throw new DibiDatabaseException('Row count is not available for unbuffered queries');
}
return mysqli_num_rows($this->resultset);
}
@@ -281,7 +281,7 @@ class DibiMySqliDriver extends NObject implements DibiDriverInterface
public function seek($row)
{
if (!$this->buffered) {
throw new BadMethodCallException(__METHOD__ . ' is not allowed for unbuffered queries');
throw new DibiDatabaseException('Cannot seek an unbuffered result set');
}
if (!mysqli_data_seek($this->resultset, $row)) {
throw new DibiDatabaseException('Unable to seek to row ' . $row);