PSD-Tutorials.de
Forum für Design, Fotografie & Bildbearbeitung
Tutkit
Agentur
Hilfe
Kontakt
Start
Forum
Aktuelles
Besonderer Inhalt
Foren durchsuchen
Tutorials
News
Anmelden
Kostenlos registrieren
Aktuelles
Suche
Suche
Nur Titel durchsuchen
Von:
Menü
Anmelden
Kostenlos registrieren
App installieren
Installieren
JavaScript ist deaktiviert. Für eine bessere Darstellung aktiviere bitte JavaScript in deinem Browser, bevor du fortfährst.
Du verwendest einen veralteten Browser. Es ist möglich, dass diese oder andere Websites nicht korrekt angezeigt werden.
Du solltest ein Upgrade durchführen oder einen
alternativen Browser
verwenden.
Antworten auf deine Fragen:
Neues Thema erstellen
Start
Forum
Sonstiges
Webdesign, Webentwicklung & Programmierung
PHP, Javascript, jQuery, Ajax, nodeJS, MySQL...
[MySQL] WHERE Clause bei Join
Beitrag
<blockquote data-quote="progfrog" data-source="post: 1036510" data-attributes="member: 101416"><p><strong>AW: [MySQL] WHERE Clause bei Join</strong></p><p></p><p><strong>@kleinerOnkel:</strong></p><p><strong></strong>CONCAT() Dient doch lediglich dazu zwei Strings im SELECT ananeinander zu hängen. Oder unterliege ich da einem Irrglauben?</p><p></p><p>Beipiel könnte ausgeben "Das tolle Icon Photoshop ist in der Datenbank vorhanden."</p><p>SELECT</p><p> CONCAT("Das tolle Icon ", icon_name, " ist in der Datenbank vorhanden.")</p><p>FROM ...</p><p><strong></strong></p><p><strong>@FORC3:</strong></p><p><strong></strong>Hier wäre mal meine Struktur und mein aktueller Query. Ich will wie gesagt erreichen, dass ich nur die Icons bekomme, die Eigenschaft 3 UND 6 auffweisen. In diesem Falle PS.</p><p></p><p>[php] Tabelle: icons</p><p>================</p><p> Feld | Typ | Attribute | Extra |</p><p>------+--------------+-------------------+----------------+</p><p> id | int(10) | UNSIGNED | auto_increment | PRIMARY KEY</p><p> url | varchar(255) | utf8_general_ci | |</p><p> </p><p></p><p> Tabelle: icons_attributes</p><p>==========================</p><p> Feld | Typ | Attribute | Extra |</p><p>--------------+--------------+-----------+-------+</p><p> icon_id | int(10) | UNSIGNED | | PRIMARY KEY </p><p> attribute_id | smallint(5) | UNSIGNED | | PRIMARY KEY</p><p></p><p></p><p></p><p>Momentaner Query:</p><p> </p><p> SELECT</p><p> url,</p><p> attribute_id</p><p> </p><p> FROM</p><p> icons</p><p> INNER JOIN icons_attributes</p><p> ON icons.id = icon_id</p><p></p><p> WHERE</p><p> attribute_id = 6 OR attribute_id = 3[/php]</p></blockquote><p></p>
[QUOTE="progfrog, post: 1036510, member: 101416"] [b]AW: [MySQL] WHERE Clause bei Join[/b] [B]@kleinerOnkel: [/B]CONCAT() Dient doch lediglich dazu zwei Strings im SELECT ananeinander zu hängen. Oder unterliege ich da einem Irrglauben? Beipiel könnte ausgeben "Das tolle Icon Photoshop ist in der Datenbank vorhanden." SELECT CONCAT("Das tolle Icon ", icon_name, " ist in der Datenbank vorhanden.") FROM ... [B] @FORC3: [/B]Hier wäre mal meine Struktur und mein aktueller Query. Ich will wie gesagt erreichen, dass ich nur die Icons bekomme, die Eigenschaft 3 UND 6 auffweisen. In diesem Falle PS. [php] Tabelle: icons ================ Feld | Typ | Attribute | Extra | ------+--------------+-------------------+----------------+ id | int(10) | UNSIGNED | auto_increment | PRIMARY KEY url | varchar(255) | utf8_general_ci | | Tabelle: icons_attributes ========================== Feld | Typ | Attribute | Extra | --------------+--------------+-----------+-------+ icon_id | int(10) | UNSIGNED | | PRIMARY KEY attribute_id | smallint(5) | UNSIGNED | | PRIMARY KEY Momentaner Query: SELECT url, attribute_id FROM icons INNER JOIN icons_attributes ON icons.id = icon_id WHERE attribute_id = 6 OR attribute_id = 3[/php] [/QUOTE]
Bilder bitte
hier hochladen
und danach über das Bild-Icon (Direktlink vorher kopieren) platzieren.
Zitate einfügen…
Authentifizierung
Wenn ▲ = 5, ▼ = 2 und ■ = 7, was ist ▲ × ▼ + ■?
Antworten
Start
Forum
Sonstiges
Webdesign, Webentwicklung & Programmierung
PHP, Javascript, jQuery, Ajax, nodeJS, MySQL...
[MySQL] WHERE Clause bei Join
Oben