aboutsummaryrefslogtreecommitdiff
path: root/classes/MaleteDb.php
diff options
context:
space:
mode:
Diffstat (limited to 'classes/MaleteDb.php')
-rw-r--r--classes/MaleteDb.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/classes/MaleteDb.php b/classes/MaleteDb.php
index 37586e2..7fa0afa 100644
--- a/classes/MaleteDb.php
+++ b/classes/MaleteDb.php
@@ -74,11 +74,13 @@ class MaleteDb implements IsisDb {
* @see IsisDb::read()
*/
public function rows() {
- $id = 0;
+ // The first entry in a malete database has id 1 and
+ // not 0, therefore $id's initial value should be 1.
+ $id = 1;
while($this->db->read($id)) {
$id++;
}
- return $id;
+ return $id - 1;
}
/**