<commit_before><?php

	// update a student's info
	// this provides a number of functions to alter a specific student's value other than their primary key
	// and the selection is done by the primary key

	// these functions operate in a generic way where you feed the id of the student
	// that is going to have a value changed and a new value for that column
	// parameters:
	//		id: the student id
	// 		new: the new value

	function edit_student_email($id, $new) {
		// this will edit the student's email

		$query = 'UPDATE Student SET Student_Email=$2 WHERE Student_id=$1';

		return pg_query_params($GLOBALS['CONNECTION'], $query, $array($id, $new));
	}

	function edit_student_firstname($id, $new) {
		// this will edit the student's first name

		$query = 'UPDATE Student SET Student_FirstName=$2 WHERE Student_id=$1';

		return pg_query_params($GLOBALS['CONNECTION'], $query, $array($id, $new));
	}

	function edit_student_lastname($id, $new) {
		// this will edit the student's last name

		$query = 'UPDATE Student SET Student_LastName=$2 WHERE Student_id=$1';

		return pg_query_params($GLOBALS['CONNECTION'], $query, $array($id, $new));
	}

	function edit_student_nick($id, $new) {
		// this will edit the student's cat nick

		$query = 'UPDATE Student SET Cat_Nickname=$2 WHERE Student_id=$1';

		return pg_query_params($GLOBALS['CONNECTION'], $query, $array($id, $new));
	}

	function edit_student_visible($id, $new) {
		// this will edit the student's state s visible

		$query = 'UPDATE Student SET Student_Visible=$2 WHERE Student_id=$1';

		return pg_query_params($GLOBALS['CONNECTION'], $query, $array($id, $new));
	}

?><commit_msg>US120: Replaced occurances of  with array. Replaced Student_Visible with Visible to match DB schema. QA complete.<commit_after><?php

	// update a student's info
	// this provides a number of functions to alter a specific student's value other than their primary key
	// and the selection is done by the primary key

	// these functions operate in a generic way where you feed the id of the student
	// that is going to have a value changed and a new value for that column
	// parameters:
	//		id: the student id
	// 		new: the new value

	function edit_student_email($id, $new) {
		// this will edit the student's email

		$query = 'UPDATE Student SET Student_Email=$2 WHERE Student_id=$1';

		return pg_query_params($GLOBALS['CONNECTION'], $query, array($id, $new));
	}

	function edit_student_firstname($id, $new) {
		// this will edit the student's first name

		$query = 'UPDATE Student SET Student_FirstName=$2 WHERE Student_id=$1';

		return pg_query_params($GLOBALS['CONNECTION'], $query, array($id, $new));
	}

	function edit_student_lastname($id, $new) {
		// this will edit the student's last name

		$query = 'UPDATE Student SET Student_LastName=$2 WHERE Student_id=$1';

		return pg_query_params($GLOBALS['CONNECTION'], $query, array($id, $new));
	}

	function edit_student_nick($id, $new) {
		// this will edit the student's cat nick

		$query = 'UPDATE Student SET Cat_Nickname=$2 WHERE Student_id=$1';

		return pg_query_params($GLOBALS['CONNECTION'], $query, array($id, $new));
	}

	function edit_student_visible($id, $new) {
		// this will edit the student's state s visible

		$query = 'UPDATE Student SET Visible=$2 WHERE Student_id=$1';

		return pg_query_params($GLOBALS['CONNECTION'], $query, array($id, $new));
	}

?>
{'fraction_non_alphanumeric': 0.12223858615611193, 'fraction_numerical': 0.006774668630338734, 'mean_word_length': 4.424920127795527, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '3924309', 'n_tokens_mistral': 1106, 'n_tokens_neox': 1021, 'n_words': 375}