[Solved] You have an error in your SQL syntax…?
You will have to check if there is no starting and trailing comma’s in the $columns or $values variables. Plus, just to be sure, put appropriate quotes around the columns and values individually. public function insert($data, $table) { $columns = “”; $values = “”; foreach ($data as $column=>$value) { $columns .= “`” . $column . … Read more