<commit_before><?php

		$id = $_POST['id'];
		$field = $_POST['field'];
		$table = $_POST['table'];
		$newValue = $_POST['newValue'];
		$whereField = $_POST['whereField'];


		$dbc = @mysqli_connect("localhost", "root", "root", "SAP")
	       or die("Could not open db SAP, " . mysqli_connect_error());
		$query = "Update $table set $field = '$newValue' where $whereField = '$id'";				
		
		
		if(mysqli_query($dbc, $query)) {
			$result = true;
		}
		else {
			$result = false;
		}
		//Add row to audit table - or add a stored procedure?
	
		$data_from_post = array('update' => $field);
		echo json_encode($result);
		mysqli_close($dbc);
?>
?><commit_msg>inline updates done and working<commit_after><?php
	require_once '../../resources/initTableFunctions.php';

	$id = $_POST['id'];
	$field = $_POST['field'];
	$table = $_POST['table'];
	$newValue = $_POST['newValue'];
	$whereField = $_POST['whereField'];


	$items = $fns->inlineUpdate($id, $field, $table, $newValue, $whereField);

	echo json_encode($items);
	$db = null;
?>
?>
{'fraction_non_alphanumeric': 0.2063953488372093, 'fraction_numerical': 0.0, 'mean_word_length': 4.243654822335025, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3686524', 'n_tokens_mistral': 399, 'n_tokens_neox': 364, 'n_words': 82}