»Forumlar »SE ? Support »s.fs_id =50 sorunsalı
  https://seditio.com.tr/eski1/forums.php?m=posts&q=1770
          Geri Dön      -      Sayfayı Yazdırmak için tıklayın
Author: TheRaskol, Posted: 2012-01-19 15:37 GMT.
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?
Author: Kaan, Posted: 2012-01-19 20:21 GMT. This post was edited by Kaan (2012-01-19 20:49 GMT, 5202 Gün ago)
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
Author: TheRaskol, Posted: 2012-01-19 20:48 GMT.
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
Author: TRouBLeSHooTeR, Posted: 2012-01-20 14:44 GMT.
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)

:
ysql]$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
Author: TheRaskol, Posted: 2012-01-20 17:31 GMT.
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 SeditioPrint version