PHP MySQL Query Soru / Yardım - tabloları Birleştirme

0 Cevap php

I need to help to show wall posts from the friends of the logged in user, and the user himself ofc.. :P
I've searched on every coding forums, and google, did not find the answer I was looking for :/

Kullanıcı oturum açmış Oturum şunlardır:

$_SESSION['userid']

Bu şimdiye kadar sahip MySQL Query:

SELECT DISTINCT * FROM status_updates JOIN friends ON status_updates.member_id = friends.friend_with LEFT JOIN members ON status_updates.member_id = members.member_id ORDER BY status_id DESC LIMIT 0,10

The query outputs the Status Update from the friends right, but when it comes to the logged in user, the Status Update get duplicated, here's what it looks like: http://i30.tinypic.com/29bkqaw.png

Orada status_updates, Test Bruker 4 için ve bir tanesi de, sadece iki giriş olan Endre Hovde ..

Ben arada Endre Hovde olarak giriş ediyorum.


I'll be thankful for any help I can get, credz for the best answer ;)
Thanks in advance! :)

/ / Endre Hovde @ rCon^

0 Cevap