Skip to content

Commit

Permalink
Update database.php
Browse files Browse the repository at this point in the history
  • Loading branch information
markjcrane authored Jul 4, 2017
1 parent 3de7521 commit 8a2f044
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions resources/classes/database.php
Original file line number Diff line number Diff line change
Expand Up @@ -1244,6 +1244,9 @@ public function save($array) {
if (strlen($array_value) == 0) {
$sql .= "null, ";
}
elseif ($array_value == "now()") {
$sql .= "now(), ";
}
else {
$sql .= "'".check_str($array_value)."', ";
}
Expand Down Expand Up @@ -1303,6 +1306,9 @@ public function save($array) {
if (strlen($array_value) == 0) {
$sql .= check_str($array_key)." = null, ";
}
elseif ($array_value == "now()") {
$sql .= check_str($array_key)." = now(), ";
}
else {
$sql .= check_str($array_key)." = '".check_str($array_value)."', ";
}
Expand Down Expand Up @@ -1431,6 +1437,9 @@ public function save($array) {
if (strlen($v) == 0) {
$sql .= check_str($k)." = null, ";
}
elseif ($v == "now()") {
$sql .= check_str($k)." = now(), ";
}
else {
$sql .= check_str($k)." = '".check_str($v)."', ";
}
Expand Down Expand Up @@ -1530,6 +1539,9 @@ public function save($array) {
if (strlen($v) == 0) {
$sql .= "null, ";
}
elseif ($v == "now()") {
$sql .= "now(), ";
}
else {
$sql .= "'".check_str($v)."', ";
}
Expand Down

0 comments on commit 8a2f044

Please sign in to comment.