<commit_before><?php

class mysql {
	private $login = array(
		'host'=>'localhost',
		'user'=>'root',
		'pass'=>'',
		'database'=>'my_app'
	);

	/**
		@param void
		@return void
	*/
	public function connect_db() {
		$con = mysql_connect($this->login['host'], $this->login['user'], $this->login['pass']) or die(mysql_error());
		mysql_select_db($this->login['database'], $con) or die(mysql_error());
	}

	/**
		@param (String) query SQL-Query
		@return (Object) SQL-Handle
	*/
	public function query($q) {
		return mysql_query($q);
	}

	/**
		@param (String) query SQL-Query
		@return (Array) data SQL-Daten als Assitiativ
	*/
	public function row($q) {
		$sql = $this->query($q);
		$data = array();
		while ($row = mysql_fetch_row($sql)) {
			$data[] = $row;
		}
		return $data;
	}

	/**
		@param (String) query SQL-Query
		@return (Array) data SQL-Daten als Assitiativ
	*/
	public function assoc($q) {
		$sql = $this->query($q);
		$data = array();
		while ($row = mysql_fetch_assoc($sql)) {
			$data[] = $row;
		}
		return $data;
	}

	/**
		@param query SQL-Query<commit_msg>Changed and updated the discription<commit_after><?php

class mysql {
	private $login = array(
		'host'=>'localhost',
		'user'=>'root',
		'pass'=>'',
		'database'=>'my_app'
	);

	/**
		@param void
		@return void
	*/
	public function connect_db() {
		$con = mysql_connect($this->login['host'], $this->login['user'], $this->login['pass']) or die(mysql_error());
		mysql_select_db($this->login['database'], $con) or die(mysql_error());
	}

	/**
		@param (String) query SQL-Query
		@return (Object) SQL-Handle
	*/
	public function query($q) {
		return mysql_query($q);
	}

	/**
		@param (String) query SQL-Query
		@return (Array) data SQL-Daten als Assitiativ Array
	*/
	public function row($q) {
		$sql = $this->query($q);
		$data = array();
		while ($row = mysql_fetch_row($sql)) {
			$data[] = $row;
		}
		return $data;
	}

	/**
		@param (String) query SQL-Query
		@return (Array) data SQL-Daten als Assitiativ Array
	*/
	public function assoc($q) {
		$sql = $this->query($q);
		$data = array();
		while ($row = mysql_fetch_assoc($sql)) {
			$data[] = $row;
		}
		return $data;
	}

	/**
		@param query SQL-Query
{'fraction_non_alphanumeric': 0.2031107044830741, 'fraction_numerical': 0.0, 'mean_word_length': 3.7440347071583515, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 23, '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': '2830188', 'n_tokens_mistral': 872, 'n_tokens_neox': 818, 'n_words': 185}