Alıntı:
mkarabulut, mesajından alıntı:
Tablo yapını bilemediğim için tahminen şöyle bir sorgudur diyebiliyorum. Kod: SELECT a.*, p.*
FROM tblAuthor a, photo_gallery p
WHERE a.authorId = p.photo_owner AND
p.photo_active = 1 AND
(p.show_friends = 0 OR " & giris_yapmis_user_id & " IN
(SELECT user_id FROM buddy_list WHERE authorId = a.authorId))
ORDER BY p.photo_id DESC
|
verdiginiz sql cumlecigini tablo isimlerine gore duzenledim. ama sonuc ayni. mysql front gibi bir programim yok. ama tablo yapisi asagidaki gibi.
photo_gallery{
photo_id
photo_url
photo_owner (fotograf sahibi id)
photo_desc
vs...
photo_visible (1 ise sadece arkadaslari gorebilecek.)
}
**senin id=5, benimkisi 2.. sen beni arkadas listene eklediginde
tblbuddylist{
author_ID (5)
buddy_ID (2)
}
tblauthor{
author_id
}
ilginize tesekkurler.