1
0
This commit is contained in:
Daniel Tartavel 2019-09-01 22:13:00 +02:00
parent c84f0de827
commit aa6487fb0d

View File

@ -3,8 +3,7 @@
<?php <?php
require("db.class.php"); require("db.class.php");
$database = $argv[1]; $database = $argv[1];
$password = (isset($argv[2]))?$argv[2]:""; $string = (isset($argv[2]))?$argv[2]:"";
$string = (isset($argv[3]))?$argv[3]:"";
$db1 = new db ("nextcloud"); $db1 = new db ("nextcloud");
$db2 = new db ("nextcloud"); $db2 = new db ("nextcloud");
@ -15,6 +14,14 @@ while( $table = $db1->result->fetch_assoc())
echo "======================>" . $table['Tables_in_nextcloud']; echo "======================>" . $table['Tables_in_nextcloud'];
$db2->query("SHOW columns FROM " . $table['Tables_in_nextcloud']); $db2->query("SHOW columns FROM " . $table['Tables_in_nextcloud']);
$columns = $db2->result->fetch_all(); $columns = $db2->result->fetch_all();
print_r($columns); foreach($s in $column AS $key)
{
if (array_search($string, $columns) !== false)
{
echo "column " . $s . " => " . "$key";
}
}
} }
?> ?>