Skip to content

Commit

Permalink
Muutetaan kaikki SHOW TABLES - kyselyt näyttämään vain tauluja ja ski…
Browse files Browse the repository at this point in the history
…ppaamaan näkymät.
  • Loading branch information
juppe committed Oct 3, 2022
1 parent e8dd59a commit 831f654
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 17 deletions.
2 changes: 1 addition & 1 deletion UTF8_mysqlkonversio.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
$sql = "ALTER DATABASE $dbkanta CHARACTER SET utf8 COLLATE utf8_unicode_ci;";
pupe_query($sql);

$query = "SHOW TABLES FROM $dbkanta";
$query = "SHOW FULL TABLES FROM `$dbkanta` WHERE Table_Type = 'BASE TABLE'";
$tabresult = pupe_query($query);

while ($tables = mysql_fetch_row($tabresult)) {
Expand Down
2 changes: 1 addition & 1 deletion check-tables.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function decho($string) {
// Ollaanko annettu --verbose komentoriviltä
$verbose_mode = (in_array("--verbose", $argv) !== false) ? true : false;

$query = "show tables from $dbkanta";
$query = "SHOW FULL TABLES FROM `$dbkanta` WHERE Table_Type = 'BASE TABLE'";
$result = pupe_query($query);

decho("Check tables from $dbkanta.");
Expand Down
2 changes: 1 addition & 1 deletion db-index.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

echo "<table><tr><td valign='top' class='back'>";

$query = "show tables from $dbkanta";
$query = "SHOW FULL TABLES FROM `$dbkanta` WHERE Table_Type = 'BASE TABLE'";
$result = pupe_query($query);

while ($row=mysql_fetch_array($result)) {
Expand Down
2 changes: 1 addition & 1 deletion db.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

echo "<table><tr><td valign='top' class='back'>";

$query = "show tables from $dbkanta";
$query = "SHOW FULL TABLES FROM `$dbkanta` WHERE Table_Type = 'BASE TABLE'";
$result = pupe_query($query);

while ($row=mysql_fetch_array($result)) {
Expand Down
3 changes: 1 addition & 2 deletions db_sql_query.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,10 @@ function toggleAll(toggleBox) {
echo "<tr><td><select name='table' onchange='submit();'>";
echo "<option value=''></option>";

$query = "SHOW tables FROM `$dbkanta`";
$query = "SHOW FULL TABLES FROM `$dbkanta` WHERE Table_Type = 'BASE TABLE'";
$result = pupe_query($query);

while ($row = mysql_fetch_array($result)) {

$query = "describe $row[0]";
$fieldresult = pupe_query($query);

Expand Down
2 changes: 1 addition & 1 deletion lue_data.php
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,7 @@ function lue_data_echo($string, $now = false) {
}

// Otetaan pupen talut haltuun
$query = "SHOW TABLES FROM `$dbkanta`";
$query = "SHOW FULL TABLES FROM `$dbkanta` WHERE Table_Type = 'BASE TABLE'";
$tableresult = pupe_query($query);

$taulunrivit_keys = array_keys($taulunrivit);
Expand Down
2 changes: 1 addition & 1 deletion mysqlaliasyllapito.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@
}

// Nyt selataan
$query = "SHOW TABLES FROM `$dbkanta`";
$query = "SHOW FULL TABLES FROM `$dbkanta` WHERE Table_Type = 'BASE TABLE'";
$tabresult = pupe_query($query);

$sel[$taulu] = "SELECTED";
Expand Down
2 changes: 1 addition & 1 deletion oletus_alv_muutos.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@

echo "<table>";

$query = "SHOW TABLES FROM $dbkanta";
$query = "SHOW FULL TABLES FROM `$dbkanta` WHERE Table_Type = 'BASE TABLE'";
$tabresult = pupe_query($query);

while ($tables = mysql_fetch_array($tabresult)) {
Expand Down
16 changes: 8 additions & 8 deletions vaihda_tuoteno.php
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ function kasittele_tuote_tiedosto($file_name, $real_name = '') {
$locktables['avainsana'] = "avainsana";

//$dbkanta --> tulee salasanat.php:stä
$query = "SHOW TABLES FROM $dbkanta";
$query = "SHOW FULL TABLES FROM `$dbkanta` WHERE Table_Type = 'BASE TABLE'";
$tabresult = pupe_query($query);

while ($tables = mysql_fetch_array($tabresult)) {
Expand Down Expand Up @@ -529,13 +529,13 @@ function kasittele_tuote_tiedosto($file_name, $real_name = '') {
AND liitos = '$vantuoteno'";
pupe_query($query);

if ($uusi_on_jo != "SAMA") {
$query = "DELETE FROM puun_alkio
WHERE yhtio = '$kukarow[yhtio]'
AND laji = 'Tuote'
AND liitos = '$vantuoteno'";
pupe_query($query);
}
if ($uusi_on_jo != "SAMA") {
$query = "DELETE FROM puun_alkio
WHERE yhtio = '$kukarow[yhtio]'
AND laji = 'Tuote'
AND liitos = '$vantuoteno'";
pupe_query($query);
}
}
elseif ($taulu == 'asn_sanomat') {
$query = "UPDATE asn_sanomat
Expand Down

0 comments on commit 831f654

Please sign in to comment.