summaryrefslogtreecommitdiff
path: root/zeige-Inventar
diff options
context:
space:
mode:
Diffstat (limited to 'zeige-Inventar')
-rwxr-xr-xzeige-Inventar38
1 files changed, 38 insertions, 0 deletions
diff --git a/zeige-Inventar b/zeige-Inventar
new file mode 100755
index 0000000..156c9aa
--- /dev/null
+++ b/zeige-Inventar
@@ -0,0 +1,38 @@
+#!/bin/bash
+
+printf 'Schrauben:\n'
+
+mysql -N --raw --batch -e '
+ SELECT *
+ FROM `Schrauben`
+ JOIN `Gewindetypen`
+ ON `Schrauben`.`Gewindetyp`=`Gewindetypen`.`id`
+ JOIN `Materialien`
+ ON `Schrauben`.`Material`=`Materialien`.`id`
+ JOIN `Koepfe`
+ ON `Schrauben`.`Kopf`=`Koepfe`.`id`;
+'
+
+printf '\n'
+
+printf 'Muttern:\n'
+
+mysql -N --raw --batch -e '
+ SELECT *
+ FROM `Muttern`
+ JOIN `Materialien`
+ ON `Muttern`.`Material`=`Materialien`.`id`;
+'
+
+printf '\n'
+
+printf 'Unterlegscheiben:\n'
+
+mysql -N --raw --batch -e '
+ SELECT *
+ FROM `Unterlegscheiben`
+ JOIN `Materialien`
+ ON `Unterlegscheiben`.`Material`=`Materialien`.`id`;
+'
+
+printf '\n'