ahwelp 6 ani în urmă
părinte
comite
cdfc24646c
1 a modificat fișierele cu 2 adăugiri și 2 ștergeri
  1. 2 2
      src/BBOrm/Entity.php

+ 2 - 2
src/BBOrm/Entity.php

@@ -74,7 +74,7 @@ abstract class Entity {
         $update_data['_update_id'] = $this->id;
 
         foreach ($columns as $column) {
-            $update_string .= $column . ":$column, ";
+            $update_string .= $column . " = :$column, ";
             $update_data[$column] = $obj[$column];
         }
 
@@ -96,7 +96,7 @@ abstract class Entity {
             $first_argument .= $column . ', ';
 
             $insert_data[$column] = $obj[$column];
-            $second_argument .= ":$column, ";
+            $second_argument .= " = :$column, ";
         }
 
         $first_argument = rtrim($first_argument, ', ');