Hey Leute,
Ich hab ein Problem mit einem Join den in MySQL versuche umzusetzen.
Hier erstmal die Tabellen:
table_downloads:
download_id | user_id | unique_id | time_downloaded | ip_address
1 0 1 1285530286 127.0.0.1
2 7 1 1285530286 127.0.0.1
3 7 1 1285530286 127.0.0.1
4 7 1 1285530286 127.0.0.1
table_ratings:
rating_id | user_id | unique_id | liked | disliked | time_rated | ip_address
1 1 6 1 0 1284655570
2 1 7 1 0 1284655570
3 2 8 0 1 1284655570
4 3 9 1 0 1284655570
Und hier is die Abfrage:
Das Ergebnis ist jetzt folgendes:
liked | disliked | downloads
8 0 8
Erwartet hätte ich aber folgendes:
liked | disliked | downloads
2 NULL 4
Kann mir wer sagen, was ich falsch gemacht habe? Ich komme einfach nicht drauf....
Danke im Vorraus!
Ich hab ein Problem mit einem Join den in MySQL versuche umzusetzen.
Hier erstmal die Tabellen:
table_downloads:
download_id | user_id | unique_id | time_downloaded | ip_address
1 0 1 1285530286 127.0.0.1
2 7 1 1285530286 127.0.0.1
3 7 1 1285530286 127.0.0.1
4 7 1 1285530286 127.0.0.1
table_ratings:
rating_id | user_id | unique_id | liked | disliked | time_rated | ip_address
1 1 6 1 0 1284655570
2 1 7 1 0 1284655570
3 2 8 0 1 1284655570
4 3 9 1 0 1284655570
Und hier is die Abfrage:
Das Ergebnis ist jetzt folgendes:
liked | disliked | downloads
8 0 8
Erwartet hätte ich aber folgendes:
liked | disliked | downloads
2 NULL 4
Kann mir wer sagen, was ich falsch gemacht habe? Ich komme einfach nicht drauf....
Danke im Vorraus!