<commit_before><?php
include( '../mysql5.php' );
include( '../../includes/restcommon.php' );


//04.22.2013 naj - get list of updates that have not been applied to the current database.
$query = "select max(Version) from tableversion";

if (!$result = $db->sql_query($query)) die( "Error in query $query\n".$db->sql_error()."\n\n");

$row = $db_support->sql_fetchrow( $result );

if ( $row[ 'Version' ] > 0 )
	$tableversion = $row[ 'Version' ];
else
	$tableversion = 0;

$keepgoing = true;
$tableversion++;
while( $keepgoing )
	{
	if ( is_file( $tableversion.".sql" ) )
		{
		//now we're going to source the sql file in question which should execute all the code
		//contained in it.
		$command = "mysql -u $dbuser --password=$dbpasswd -h ".$dbhost.' '.$dbname. ' < ' .$tableversion. '.sql';
		$msg = "\nPlease wait while updates are performed for ".$$tableversion;
		shell_exec( $command ); <commit_msg>updated upgrade utility<commit_after><?php
include( '../mysql5.php' );
include( '../../includes/restcommon.php' );


//04.22.2013 naj - get list of updates that have not been applied to the current database.
$query = "select max(Version) from tableversion";

if (!$result = $db->sql_query($query)) die( "Error in query $query\n".$db->sql_error()."\n\n");

$row = $db->sql_fetchrow( $result );

if ( $row[ 'Version' ] > 0 )
	$tableversion = $row[ 'Version' ];
else
	$tableversion = 0;

$keepgoing = true;
$tableversion++;
while( $keepgoing )
	{
	if ( is_file( $tableversion.".sql" ) )
		{
		//now we're going to source the sql file in question which should execute all the code
		//contained in it.
		$command = "mysql -u $dbuser --password=$db<PASSWORD> -h ".$dbhost.' '.$dbname. ' < ' .$tableversion. '.sql';
		$msg = "\nPlease wait while updates are performed for ".$$tableversion;
		shell_exec( $command ); 
{'fraction_non_alphanumeric': 0.18412348401323042, 'fraction_numerical': 0.012127894156560088, 'mean_word_length': 3.763779527559055, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 12, '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': '7450992', 'n_tokens_mistral': 642, 'n_tokens_neox': 613, 'n_words': 190}