function updateWithConstratints($table, $data, $constraints) { $update = makeBaseUpdate($table, $data) . " WHERE"; foreach ($constraints as $columnName => $value) { $update .= " " . $columnName . "='" . $value . "' AND "; } $update = substr($update, 0, strlen($update) - 4) . ";"; runInsert($update); }
function updateWithConstratints($table, $data, $constraints) { $update = makeBaseUpdate($table, $data) . " "; foreach ($constraints as $columnName => $value) { $update .= "WHERE " . getColumnQuote($columnName) . "='" . $value . "' AND "; } $update = cutString($update, 4) . ";"; runInsert($update); }
function updateWithConstratints($table, $data, $constraints) { $update = makeBaseUpdate($table, $data) . " "; $update .= getConstraints($constraints) . ";"; runInsert($update); }