Commit b6262552 authored by Alexander Butenko's avatar Alexander Butenko

Merge pull request #341 from avbdr/master

fixes
parents 531957ad 44c8895a
...@@ -186,7 +186,7 @@ class dbObject { ...@@ -186,7 +186,7 @@ class dbObject {
*/ */
private function JsonBuilder () { private function JsonBuilder () {
$this->returnType = 'Json'; $this->returnType = 'Json';
return $this; return $return;
} }
/** /**
...@@ -233,7 +233,7 @@ class dbObject { ...@@ -233,7 +233,7 @@ class dbObject {
return false; return false;
$id = $this->db->insert ($this->dbTable, $sqlData); $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->data[$this->primaryKey] = $id;
$this->isNew = false; $this->isNew = false;
......
...@@ -126,7 +126,7 @@ $data = Array ("login" => "admin", ...@@ -126,7 +126,7 @@ $data = Array ("login" => "admin",
"createdAt" => $db->now(), "createdAt" => $db->now(),
"updatedAt" => $db->now(), "updatedAt" => $db->now(),
); );
$updateColumns = Array ("updateAt"); $updateColumns = Array ("updatedAt");
$lastInsertId = "id"; $lastInsertId = "id";
$db->onDuplicate($updateColumns, $lastInsertId); $db->onDuplicate($updateColumns, $lastInsertId);
$id = $db->insert ('users', $data); $id = $db->insert ('users', $data);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment