From f68f3c9f08aaffde2e7ad54ffbcac98e9d6e33e9 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Sun, 13 Oct 2019 18:01:22 +0200 Subject: zeige-Inventar neu --- zeige-Inventar | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100755 zeige-Inventar (limited to 'zeige-Inventar') 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' -- cgit v1.2.3-70-g09d2