<commit_before><?php

$changes = array(
    // 'source' => 'destination',
);

// SQL
$database = array(
    "type" => "mysql",
    "host" => "localhost",
    "database" => "DATABASE",
    "user" => "USERNAME",
    "pass" => "PASSWORD"
);
$pdo = new SimplePDO($database);


$tables = sql_all('SHOW TABLES');

foreach($tables as $i=>$table)
{
    $columns = sql_all('SHOW COLUMNS FROM '.$table,"field");
    foreach($columns as $column)
    {
        foreach($changes as $source=>$dest)
        {
            // Voir si la colonne contient la chaine recherche
            if(sql_first("SELECT * FROM `".$table."` WHERE `".$column."` LIKE '%".$source."%'"))<commit_msg>Correction bug show tables<commit_after><?php

$changes = array(
    // 'source' => 'destination',
);

// SQL
$database = array(
    "type" => "mysql",
    "host" => "localhost",
    "database" => "DATABASE",
    "user" => "USERNAME",
    "pass" => "PASSWORD"
);
$pdo = new SimplePDO($database);


$tables = sql_all('SHOW TABLES',"tables_in_".$database['database']);

foreach($tables as $i=>$table)
{
    $columns = sql_all('SHOW COLUMNS FROM '.$table,"field");
    foreach($columns as $column)
    {
        foreach($changes as $source=>$dest)
        {
            // Voir si la colonne contient la chaine recherche
            if(sql_first("SELECT * FROM `".$table."` WHERE `".$column."` LIKE '%".$source."%'"))
{'fraction_non_alphanumeric': 0.20652173913043478, 'fraction_numerical': 0.0, 'mean_word_length': 3.0979228486646884, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 19, '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': '6132627', 'n_tokens_mistral': 472, 'n_tokens_neox': 469, 'n_words': 108}