From 94a9d95e4dcf598e3fbcbad0d323700275ee4985 Mon Sep 17 00:00:00 2001 From: Daniel Tartavel Date: Sun, 1 Sep 2019 23:26:49 +0200 Subject: [PATCH] DT --- findindb.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/findindb.php b/findindb.php index 7a6cfba..5c6e042 100755 --- a/findindb.php +++ b/findindb.php @@ -25,13 +25,13 @@ while( $table = $db1->result->fetch_assoc()) $columns = $db2->result->fetch_all(); foreach($columns AS $key=>$s) { - print_r($s[0]); - $db2->query("SELECT * FROM " . $table['Tables_in_nextcloud'] . " WHERE " . $s[0] . "='%'"); - $tableau = $db2->result->fetch_all(); - echo "column " . $s[0] . "\n"; - if (array_search($string, $tableau) !== false) + print_r($s[0]) . "\n"; + $db2->query("SELECT * FROM " . $table['Tables_in_nextcloud'] . " WHERE " . $s[0] . "='" . $string . "'"); + if ( $db2->result->count ) { - echo "column " . $s . " => " . "$key\n"; + $tableau = $db2->result->fetch_all(); + echo "column " . $s[0] . "\n"; + print_r($tableau); } }