]> git.mxchange.org Git - friendica.git/commitdiff
An array with fieldnames as keys is important for the "insert" in the "update" function
authorMichael <heluecht@pirati.ca>
Sat, 3 Mar 2018 13:26:23 +0000 (13:26 +0000)
committerMichael <heluecht@pirati.ca>
Sat, 3 Mar 2018 13:26:23 +0000 (13:26 +0000)
include/dba.php

index 247e6ac83a76d6c9b0448fb1aa625ec7a0ead317..4f7ca4da35af7d9544fba7f8b8a75699986fb73a 100644 (file)
@@ -1245,7 +1245,7 @@ class dba {
                                                $placeholders = substr(str_repeat("?, ", count($value)), 0, -2);
                                                $condition_string .= "`" . $field . "` IN (" . $placeholders . ")";
                                        } else {
-                                               $new_values[] = $value;
+                                               $new_values[$field] = $value;
                                                $condition_string .= "`" . $field . "` = ?";
                                        }
                                }