From 8218443c015f0be1c192cd7bd5d2f80296dab19c Mon Sep 17 00:00:00 2001 From: Alexander Butenko Date: Thu, 15 Oct 2015 19:07:44 +0300 Subject: [PATCH 1/2] fix a typo in manual --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index e418519b..f97e2555 100644 --- a/readme.md +++ b/readme.md @@ -126,7 +126,7 @@ $data = Array ("login" => "admin", "createdAt" => $db->now(), "updatedAt" => $db->now(), ); -$updateColumns = Array ("updateAt"); +$updateColumns = Array ("updatedAt"); $lastInsertId = "id"; $db->onDuplicate($updateColumns, $lastInsertId); $id = $db->insert ('users', $data); From 44c8895a6ee50ad92332ea37ad19b36c68e31a80 Mon Sep 17 00:00:00 2001 From: Alexander Butenko Date: Thu, 15 Oct 2015 19:09:04 +0300 Subject: [PATCH 2/2] fix couple typos --- dbObject.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dbObject.php b/dbObject.php index 17af3420..8897b273 100644 --- a/dbObject.php +++ b/dbObject.php @@ -186,7 +186,7 @@ public function __unset ($name) { */ private function JsonBuilder () { $this->returnType = 'Json'; - return $this; + return $return; } /** @@ -233,7 +233,7 @@ public function insert () { return false; $id = $this->db->insert ($this->dbTable, $sqlData); - if (!empty ($this->primaryKey) && !isset($this->data[$this->primaryKey])) + if (!empty ($this->primaryKey) && empty ($this->data[$this->primaryKey])) $this->data[$this->primaryKey] = $id; $this->isNew = false;