Total Users Online: 0 üye, 21 guest | Tarih/Saat: 2012-05-23 03:13
 
s.fs_id =50 sorunsalı
2012-01-19 15:37 GMT  Çoklu Alıntı
TheRaskol

User is: Online status   Gender_M
Posts: 411
Ülke: Çanakkale - 17
Meslek: Palyaço
Age: 24

Merhaba;



Arkadaşlar bir eklenti yapmıştım son forum konuları diye fakat ben bir bölümde fs_id 50 51 ve 52 olanların çıkmasını istiyorum ama bunları bir arda yazınca olmuyor.



Şöyle oluyor.
Kod:
$sqlsource = sed_sql_query("SELECT t.ft_id, t.ft_sectionid, t.ft_title, t.ft_updated, t.ft_postcount, t.ft_viewcount, t.ft_lastposterid, t.ft_lastpostername, s.fs_id, s.fs_title, s.fs_category FROM $db_forum_topics t,$db_forum_sections s
WHERE t.ft_sectionid=s.fs_id AND t.ft_movedto=0 AND t.ft_mode=0 AND s.fs_id =50 ORDER by t.ft_updated DESC LIMIT $plimit4");


fakat fs_id=51 ve 52 eklediğimde olmuyor.
Kod:
$sqlsource = sed_sql_query("SELECT t.ft_id, t.ft_sectionid, t.ft_title, t.ft_updated, t.ft_postcount, t.ft_viewcount, t.ft_lastposterid, t.ft_lastpostername, s.fs_id, s.fs_title, s.fs_category FROM $db_forum_topics t,$db_forum_sections s
WHERE t.ft_sectionid=s.fs_id AND t.ft_movedto=0 AND t.ft_mode=0 AND s.fs_id =50 AND s.fs_id =51 AND s.fs_id =52 ORDER by t.ft_updated DESC LIMIT $plimit4");


Nasıl 3 kategorinin görünmesini sağlarım?
Konuyla İlgili Diğer Başlıklar

 

s.fs_id =50 sorunsalı
2012-01-19 20:21 GMT  Çoklu Alıntı
Kaan

User is: Online status   Gender_M
Posts: 2471
Ülke: İstanbul - 34
Meslek: Serbest
Age: 29

Sql 1.
Kod:
$sql1 = sed_sql_query("SELECT t.ft_id, t.ft_sectionid, t.ft_title, t.ft_updated, t.ft_postcount, t.ft_viewcount, t.ft_lastposterid, t.ft_lastpostername, s.fs_id, s.fs_title, s.fs_category FROM $db_forum_topics t,$db_forum_sections s
WHERE t.ft_sectionid=s.fs_id AND t.ft_movedto=0 AND t.ft_mode=0 AND s.fs_id =50 ORDER by t.ft_updated DESC LIMIT $plimit4");

Sql 2.
Kod:
$sql2 = sed_sql_query("SELECT t.ft_id, t.ft_sectionid, t.ft_title, t.ft_updated, t.ft_postcount, t.ft_viewcount, t.ft_lastposterid, t.ft_lastpostername, s.fs_id, s.fs_title, s.fs_category FROM $db_forum_topics t,$db_forum_sections s
WHERE t.ft_sectionid=s.fs_id AND t.ft_movedto=0 AND t.ft_mode=0 AND s.fs_id =51 ORDER by t.ft_updated DESC LIMIT $plimit4");

Sql 3.
Kod:
$sql3 = sed_sql_query("SELECT t.ft_id, t.ft_sectionid, t.ft_title, t.ft_updated, t.ft_postcount, t.ft_viewcount, t.ft_lastposterid, t.ft_lastpostername, s.fs_id, s.fs_title, s.fs_category FROM $db_forum_topics t,$db_forum_sections s
WHERE t.ft_sectionid=s.fs_id AND t.ft_movedto=0 AND t.ft_mode=0 AND s.fs_id =52 ORDER by t.ft_updated DESC LIMIT $plimit4");


Bunları aynı dosya içerisinde çalıştırcaksın ve ilkini nasıl yaptıysan bunlarıda yeni yapar gibi altına devam ediceksin

Bu mesaj Kaan tarafından 2012-01-19 20:49 GMT, 124 Gün önce düzenlendi.
Seditio Emlak Scripti Demo: http://fordcikmacisi.net/emlak/
Seditio Oto Galeri Scripti Demo: http://fordcikmacisi.net/otogaleri/
Siparişleriniz için PM veya kaan@ntka.org Mail Gönderin.
Bi Dünya Müzik: http://bdmfan.com
Seditio Şimdi Daha Güvenli ve Daha Hızlı Gücünü Hissedin.
Takdir ediliyorsan değil, Taklit ediliyorsan başarmışsın demektir.
-Albert Einstein

 

s.fs_id =50 sorunsalı
2012-01-19 20:48 GMT  Çoklu Alıntı
TheRaskol

User is: Online status   Gender_M
Posts: 411
Ülke: Çanakkale - 17
Meslek: Palyaço
Age: 24

sorunu şöyle çözmek istedim ama yine hata çıktı.


Bunun yerine
Kod:
s.fs_id =50 AND s.fs_id =51 AND s.fs_id =52
bunu koymak istedim
Kod:
s.fn_id =18

 

s.fs_id =50 sorunsalı
2012-01-20 14:44 GMT  Çoklu Alıntı
TRouBLeSHooTeR

User is: Online status   Gender_M
Posts: 75
Ülke: Adana - 01
Meslek: Computer Engineer
Age: 47

Alıntı
#6709 TheRaskol :
sorunu şöyle çözmek istedim ama yine hata çıktı.


Bunun yerine
Kod:
s.fs_id =50 AND s.fs_id =51 AND s.fs_id =52
bunu koymak istedim
Kod:
s.fn_id =18




o şekilde olmaz raskol, dikkat et. bak
sen forum_sections'a s deyip, orada olmayan fn_id yi çekemezsin. şu şekilde yap fn_id hangi tablodaysa ona TABLOADI diyelim.(hatırlamıyorum tablo isimklerini)

MYSQL:
$sql3 = sed_sql_query("SELECT t.ft_id, t.ft_sectionid, t.ft_title, t.ft_updated, t.ft_postcount, t.ft_viewcount, t.ft_lastposterid, t.ft_lastpostername, s.fs_id, s.fs_title, s.fs_category FROM $db_forum_topics t,$db_forum_sections s, $db_TABLOADI raskol
WHERE t.ft_sectionid=s.fs_id AND t.ft_movedto=0 AND t.ft_mode=0 AND raskol.fn_id =18 ORDER by t.ft_updated DESC LIMIT $plimit4"
);


TABLOADI yazan yere içinde "fn_id" yi tutan tablonun adını yaz. olur

 

s.fs_id =50 sorunsalı
2012-01-20 17:31 GMT  Çoklu Alıntı
TheRaskol

User is: Online status   Gender_M
Posts: 411
Ülke: Çanakkale - 17
Meslek: Palyaço
Age: 24

OR kullanarak yaptım teşekkür ederim.



Kod:
t.ft_mode=0 AND (s.fs_id =50 OR s.fs_id =51 OR s.fs_id =52)

 

Powered by Seditio © 2009-2012 All Rights Reserved