-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Description
I would suggest making these changes to the update function. Remove the lastID since this is an update statement and is not needed. Also adding single quotes to the values so that it does not crash on string values.
public function updateRow($table, $row_id, $data) {
$keys = implode(',', array_keys($data));
$values = implode('\',\'', array_values($data));
$sql = "UPDATE $table SET ($keys) = ('$values') WHERE cartodb_id = $row_id;";
# $sql .= "SELECT $table.cartodb_id as id, $table.* FROM $table ";
# $sql .= "WHERE cartodb_id = currval('public." . $table . "_cartodb_id_seq');";
return $this->runSql($sql);
}
Metadata
Metadata
Assignees
Labels
No labels