cybton.com
Über uns | Jobs | Werbung | Sitemap | AGB | Impressum | Hilfe ?
 Kostenlos anmelden)
Home
Impressum
Sitemap
AGB
Kontakt
Hilfe

Über Uns
Was ist Cybton?
Mitarbeiter
Technik
Werbung
Jobs


Statistik
Mitglieder gesamt: 68138
Mitglieder online: 5
Gäste online: 6
mehr...

Anzeige
Home » Suche

Suche

(97 Ergebnisse)Forum
        [PHP] Tabelle sortiert ausgeben
        [gelöst]Problem mit MySQL-Datenbankabfrage
+

Wahrscheinlich ist das für viele von euch ein absolut trivialer Fall, aber ich komm heute irgendwie nicht mehr hinter meinen Denkfehler / Programmierfehler. Bin vor allem auf dem Gebiet der Verknüpfung von MySQL Tabellen eher ein Neuling:

Also ich habe 2 Tabellen: Tabelle 1, Tabelle 2

In Tabelle 2 befindet sich der Fremschlüssel, der die Datensätze aus Tabelle 2 eindeutig den Datensätzen aus Tabelle 1 zuordnet. Also folgende Struktur

Tabelle 1:
tab1_id | tab1_name | weitere Spalte

Tabelle 2:
tab2_id | tab2_name | weitere Spalte | tab1_id

Nun verwende ich folgende SQL-Abfrage (natürlich nicht exakt folgender Code, es geht nur ums Prinzip):

SELECT * FROM tabelle 1 LEFT JOIN tabelle 2 ON tabelle2.tab1_id=tabelle1.tab1_id

Das Problem ist nur, dass in meiner Ausgabe auf der Webseite per Php die Datensätze aus Tabelle 1 nur ein einziges Mal vorkommen sollen, und praktisch pro Datensatz aus Tabelle 1 eine Liste mit den dazugehörigen Datensätzen aus Tabelle 2.

Mit meiner SQL-Abfrage passiert aber folgendes: Sobald es mehrere Datensätze in Tabelle 2 gibt, die denselben Fremschlüssel besitzen, wird der betreffende Datensatz aus Tabelle 1 ebenfalls mehrmals ausgegeben.

Jetzt könnte man das ganze natürlich umdrehen, also in tabelle 1 den fremdschlüssel legen und dann das ganze Spiel umdrehen, nur müssen zwingend alle Datensätze aus der Tabelle 1 ausgegeben werden, egal ob es einen Datensatz in Tabelle 2 gibt, der den richtigen Fremdschlüssel besitzt oder nicht. Wenn es mehrere entsprechende Datensätze gibt, dann sollen diese als Liste ausgegeben werden.

Wer es will, kann als Vergleich zum besseren Verständnis das Forum heranziehen. Hier wird ja auch nicht pro Attachement ein und derselbe Post mehrmals angezeigt.

Ich hoffe, ich hab das verständlich ausgedrückt und ihr könnt mir helfen.

        [gelöst] Problem mit MySQL LEFT JOIN
        Verschiedene Probleme mit PHP, SQL und HTML
        [gelöst] PC startet nach Windows-Update nicht mehr
+

Wäre schön zu wissen, welches System, was haste davor gemacht (Hardware installiert, etc)?

Zitat von http://msdn.microsoft.com/en-us/library/ms819294.aspx:
Error Message:

STOP: 0x00000071 (parameter, parameter, parameter, parameter) SESSION5_INITIALIZATION_FAILED
Explanation:

This is a Windows 2000 Executive character-mode STOP message. During phase 1 initialization of the Windows 2000 Executive, the session manager terminated. This can only happen during the relatively short period of time that the Windows 2000 Executive is being initialized, during phase 4 of Windows 2000 startup. There might be a problem with a device driver.
User Action:

If this is the first time you have booted after installing new hardware, remove the hardware and boot again. Check the Microsoft Hardware Compatibility List to verify that the hardware and its drivers are compatible with Windows 2000. For information about the hardware, contact the supplier. If you are installing Windows 2000 for the first time, check the Windows 2000 system requirements, including the amount of RAM and disk space required to load the operating system. Also, check the Hardware Compatibility List to verify that the system can run Windows 2000. If Windows 2000 is loaded and no new hardware has been installed, reboot with recovery options set to create a dump file. If the message continues to appear, select the Last Known Good option when you reboot. If there is no Last Known Good configuration, try using the Emergency Repair Disk. If you do not have an Emergency Repair Disk, contact your technical support group.

        Bluescreen *** stop: 0x00000071
        Aktuelles Geburtsdatum ausgeben mit PHP
(1 Ergebnis)User
select
Es wurde in den Kategorien News, Hilfe, Tutorial, Homepages, Basar und Buecher nichts gefunden.
nach obennach oben

Copyright © 2008 cybton-network

Google
Partner: #Musik - Dein Internetradio - nexem. - .wir machen news - Your-Book.net - Dein kostenloses Gästebuch
ANEXIA - PHP Entwicklung - Dockers - s.Oliver Schuhe - Think Schuhe - der eigene Weg - Dorfen - Paul Green Schuhe - Bequeme Geox - Web-Entwicklung