/*SQLS_index_ana*/
(
select 'new_added_biographies' as index_tip,v.id as varlik_id,kelime,seo_url,eklenme_tarihi,foto,ziyaret_sayisi,'google_alt_baslik' from varliklar as v where tip='kisi' order by id desc limit 10
)
union all

(
select 'most_read_biographies' as index_tip,v.id as varlik_id,kelime,seo_url,eklenme_tarihi,foto,ziyaret_sayisi ,'x' from varliklar as v where tip='kisi' order by ziyaret_sayisi desc limit 10
)
union all

(
select 'people_on_the_agenda' as index_tip,v.id as varlik_id,kelime,seo_url,eklenme_tarihi,foto,ziyaret_sayisi,d.deger as 'google_alt_baslik'from varliklar as v
LEFT JOIN degerler as d on v.id=d.varlik_id and d.tip='kisi'
where d.nitelik='google_alt_baslik'and v.tip='kisi'
limit 10
)
union all

(
select 'born_today' as index_tip,v.id as varlik_id,kelime,seo_url,eklenme_tarihi,foto,ziyaret_sayisi,'x' from varliklar as v
LEFT JOIN degerler as d on v.id=d.varlik_id
where DATE_FORMAT(STR_TO_DATE(d.deger, '%Y-%m-%d'),'%m-%d')=DATE_FORMAT(Now(), '%m-%d') and d.nitelik='Date_of_birth' and d.tip='kisi'
limit 10
)
union all

(
select 'died_today' as index_tip,v.id as varlik_id,kelime,seo_url,eklenme_tarihi,foto,ziyaret_sayisi,'x' from varliklar as v
LEFT JOIN degerler as d on v.id=d.varlik_id
where DATE_FORMAT(STR_TO_DATE(d.deger, '%Y-%m-%d'),'%m-%d')=DATE_FORMAT(Now(), '%m-%d') and d.nitelik='Date_of_died' and d.tip='kisi'
limit 10
)
union all

(
select 'news' as index_tip,v.id as varlik_id,kelime,seo_url,eklenme_tarihi,d.deger as foto,ziyaret_sayisi,'x' from varliklar as v
LEFT JOIN degerler as d on v.id=d.varlik_id and d.nitelik='resimler' and d.tip='news'
where d.tip='news'
GROUP BY v.id desc
limit 5
)
;
/*SQLS_kategori*/
select
v.kelime,v.foto,v.seo_url,k.nitelik,k.deger
from degerler as k
RIGHT JOIN varliklar as v on k.varlik_id=v.id

where 1 and k.nitelik='job' and k.deger='professional fitness coach' and k.tip='kisi'
group by k.varlik_id


LIMIT 0,50
Xwhos: Biography library
© 2015 xwhos.com
About us Help
4.0872390270233