| | | | |
| |||||||
| Datenbanken SQL und Co |
|
| | LinkBack | Themen-Optionen | Thema bewerten |
| | |
| PHP Code Flüsterer Registriert seit: 21.08.2005 Beiträge: 4682 PHP-Kenntnisse: Fortgeschritten | |
| | |
| Gast
Beiträge: n/a
| Hi. Code: SELECT * FROM artcol WHERE NOT EXISTS ( SELECT * FROM artikel WHERE artikel.color_id = artcol.color_id ); Code: SELECT * FROM artcol WHERE color_id NOT IN ( SELECT color_id FROM p_farben ); Andreas |
|
| | ||
| Gast
Beiträge: n/a
| Danke für die Hilfe Leider funktioniert das auch nicht. Es erscheint auch die Fehlermeldung: Zitat:
Ich benutze die MYSQL-Version 4.0.20a Gruss epps_21 | |
|
| | ||
| Gast
Beiträge: n/a
| Ich habe die Abfrage eins zu eins aus dem Beitrag von Andreas in Mysql-Front kopiert: Code: 1: SELECT * FROM artcol 2: WHERE color_id NOT IN ( 3: SELECT color_id FROM p_farben 4: ); Code: # # Table structure for table artcol # CREATE TABLE `artcol` ( `color_id` int(6) unsigned NOT NULL auto_increment, PRIMARY KEY (`color_id`) ) TYPE=MyISAM; # # Table structure for table artikel # CREATE TABLE `artikel` ( `Id` int(6) unsigned NOT NULL auto_increment, `color_id` tinyint(4) default NULL, PRIMARY KEY (`Id`) ) TYPE=MyISAM; Zitat:
Gruss epps_21 | |
|
| | |
| Erfahrener Benutzer Registriert seit: 02.04.2008
Beiträge: 4.034
![]() | Was hast du für eine MySQLO-Version? Falls < 4.1 gehen Subselects nicht. Andernfalls müssten beide Versionen funktionieren, auch wenn SELECT * schlecht ist, besonders in Subselects. http://www.phpfriend.de/ftopic20484.html Sonst könnte die folgende Version dein Problem lösen: Code: SELECT feld1, feld2, ...
FROM artcol a
LEFT JOIN artikel b on a.color_id = b.color_id
WHERE ISNULL(b.color_id);
__________________ Gruss L |
| | |
| | |
| Gast
Beiträge: n/a
| Hallo, danke an alle für die Hilfe. Gerade habe ich festgestellt, dass diese Abfragen nicht in der V4.0.20 unterstützt werden. Da habe ich wohl in der falschen Dokugeschaut. Ja,ja, ich weiss, "wer lesen kann ist klar im Vorteil" :wink: , danke für den Tip @lazydog, ich denke das löst mein Problem. Gruss epps_21 |
|
|
| Themen-Optionen | |
| Thema bewerten | |
|
|
Ähnliche Themen | ||||
| Thema | Autor | Forum | Antworten | Letzter Beitrag |
| PHP richtig lernen! | TeazY | PHP Tipps 2008 | 5 | 01.02.2008 21:50 |
| EXISTS Abfragre tut unter Mysql 5.0 aber nicht unter 4.x | snuggl3s | Datenbanken | 6 | 26.04.2006 12:21 |
| [Erledigt] Modularisierung: Wie macht man es richtig? | PHP-Fortgeschrittene | 1 | 12.03.2006 16:00 | |
| [Erledigt] Hoffe das ich Hier richtig bin | Datenbanken | 2 | 31.01.2006 10:48 | |
| [Erledigt] Lieg ich da richtig? | Datenbanken | 4 | 31.08.2005 13:21 | |
| [Erledigt] VARIABLEN WERDEN NICHT RICHTIG VERARBEITET!!!! HILFE | PHP Tipps 2005-2 | 6 | 02.07.2005 18:32 | |
| PHP funktioniert nicht richtig?! | PHP Tipps 2005-2 | 26 | 11.06.2005 09:05 | |
| Variable wird nicht richtig übergeben | PHP Tipps 2005 | 17 | 16.01.2005 16:51 | |
| Subquery kurios..wie gehts richtig? | PHP Tipps 2005 | 4 | 04.01.2005 20:24 | |
| Tabelle wird im IE nicht richtig angezeigt | fantast | HTML, Usability und Barrierefreiheit | 3 | 07.11.2004 13:05 |
| [Erledigt] imap_body RICHTIG ausgeben (mit allen Sonderzeichen usw.) | PHP-Fortgeschrittene | 3 | 08.09.2004 02:33 | |
| [Erledigt] Perl richtig installiert oder falsch ? testen aber wie ? | c01001 | Server, Hosting und Workstations | 2 | 31.08.2004 22:37 |
| Formular, welches prüft, ob eingegebene Antwort richtig.... | PHP Tipps 2004 | 10 | 15.08.2004 22:18 | |
| php funktioniert nicht richtig | PHP Tipps 2004 | 3 | 14.06.2004 08:04 | |
| Newsscript sortiert nicht so richtig | PHP Tipps 2004 | 20 | 07.06.2004 18:21 | |
| Besucher kamen über folgende Suchanfragen bei Google auf diese Seite |
| select not exists, select where not exists, sql not in not exists, sql not exists, not exists, not in not exists, php not in, not exists sql, not exists not in, sql not exists not in, informix not exists, php \not in\, informix exists, sql \not in\ \not exists\, \not in\ \not exists\, select not in sql, sql not exists in, sql exists, where not exists sql, sql not in oder not exists |

Dieser Inhalt ist unter einer Creative Commons-Lizenz lizenziert.