https://www.php-resource.de/forum/sql-datenbanken/43862-logik-problem-mit-mysql