public function db_search_in_table($table, $key_word, $all_table) { // premier foreach sur le tab de table si il y en a plusieurs donc faut un count if ($all_table == TRUE) { $table = $this->db_get_list_table(); foreach ($table as $row => $values) { if ($values->TABLE_NAME == 'data_sync' || $values->TABLE_NAME == 'language' || $values->TABLE_NAME == 'ma_cmd_cli_det' || $values->TABLE_NAME == 'ma_offers_rows') { unset($table[$row]); } } $i = 0; $j = 0; foreach ($table as $row_table) { $res_list_champs = $this->other_query('SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME= "' . $row_table->TABLE_NAME . '" AND TABLE_SCHEMA = "matedex"'); foreach ($res_list_champs as $row) { $req = 'SELECT * FROM ' . $row_table->TABLE_NAME . ' WHERE `' . $row->COLUMN_NAME . '` LIKE "%' . $key_word . '%" ORDER BY created_on'; $res_sql = $this->other_query('SELECT * FROM ' . $row_table->TABLE_NAME . ' WHERE `' . $row->COLUMN_NAME . '` LIKE "%' . $key_word . '%" ORDER BY created_on'); if ($res_sql) { affiche_pre($req); //affiche_pre($res_sql); $i++; } else { $j++; } } } // on a récupérer la liste des champs de la table } else { if ($all_table == FALSE) { $i = 0; $j = 0; foreach ($table as $row_table) { $res_list_champs = $this->other_query('SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME= "' . $row_table . '"'); foreach ($res_list_champs as $row) { $i++; $req = "SELECT * FROM '.{$row_table}.' WHERE `'.{$row->COLUMN_NAME}.'` LIKE " % '.$key_word.' % " ORDER BY created_on"; $res_sql = $this->other_query("SELECT * FROM '.{$row_table}.' WHERE `'.{$row->COLUMN_NAME}.'` LIKE " % '.$key_word.' % " ORDER BY created_on"); if ($res_sql) { affiche_pre($req); //affiche_pre($res_sql); $i++; } else { $j++; } } } // on a récupérer la liste des champs de la table } } return paragraphe_style("Aucune lignée n'a été détéctée : " . $j . " , nombre de ligne retournée : " . $i); }
class="form-control" name="<?php echo $key_2; ?> "> </div> </div> <br><?php } } ?> <button style="width: 650px; margin-top:15px;" type="submit" class="btn btn-default">Submit</button> </form> </div> </div> </div> <?php } affiche_pre($_POST); ?> <script> var champ = $('<input>'); champ.attr('type', 'text'); champ.attr('name', 'nom_du_nouveau_champ'); champ.appendTo('form'); </script>
<?php affiche_pre($version . ' Créé par Baudoux Loïc , Alias Evengyl Copyright 2014');
require_once ("Evengyl/fonction.php"); $test = "matedex@matedex.be,Matedex,Matedex\n ,,A.A.G. ,,ACCAUTOPARTS-NAMUR ,,ACCAUTOPARTS-NAMUR ,,ACCAUTOPARTS-NAMUR ,,ACTIF PROTECTION ,BARREMAECKER,ACTIF PROTECTION ,,AITEC ,Bert HERMAN,AITEC info@aitec.be,Bert HERMAN,AITEC ,AITEC,AITEC ,,ALFA PARTS guy@alfaparts.be,Guy,ALFA PARTS ,,FABREX ,,FABREX ,,AMEYE BOSSAERT ,,ARDENNES DIESEL ardennediesel@skynet.be,Philippe,ARDENNES DIESEL ,,ARTON ,Andre,ARTON ,,T&A ASSEMAN Electronics ,,AVIONIC ,,AVIONIC ,,AZ - TRONIC"; affiche_pre($test); ?>
function info_table() { $_db_connect = new _db_connect(); $base_name = $_db_connect->get_name_base(); $req_sql = "SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='" . $base_name . "'"; while ($row = $_db_connect->fetch_object($req_sql)) { unset($row->TABLE_CATALOG); unset($row->ENGINE); unset($row->VERSION); unset($row->AVG_ROW_LENGTH); unset($row->INDEX_LENGTH); unset($row->DATA_FREE); unset($row->CHECK_TIME); unset($row->CHECKSUM); unset($row->CREATE_OPTIONS); unset($row->TABLE_COMMENT); affiche_pre($row); } unset($row); unset($req_sql); }