Find Jobs
Hire Freelancers

Quick PHP Query Project

$30-100 USD

Sürüyor
İlan edilme: yaklaşık 18 yıl önce

$30-100 USD

Teslimde ödenir
I am building a topsites list, and in the process of ranking sites have stumbled on a problem. I list sites in order of the sum of their views in the last 7 days, from topsite_views which contains the number of views for any given day there is more than 1 view. I know how to do this. My trouble is how to assign an actual rank number to the sites. I need to find how many sites are above them and add 1 (I know this much), but I don't know how to compare them when the actual calculation takes place inside the query. Here is an example: First, I find out the sum of views in last 7 days for the site in question ($valuex), then I want to see how many sites are better: $qry = "select sum(views) as viewsum from topsite_views where viewsum >= '$valuex'"; Obviously, the query fails because it doesnt know what viewsum is until the query is finished... yada yada.. To clarify: The query needs to count the number of sites in the toplist_views table that have a sum of views column [where date = DATE_SUB(curdate(),INTERVAL 7 day)] which is greater than a specific value. I cannot use subselects or subqueries because of my mysql version. For example, if I was just counting the sum of views for one site it would be: $prerankqry = "select sum(views) as viewsum from toplist_views where siteid='$siteid' and date = DATE_SUB(curdate(),INTERVAL 7 day) group by siteid"; Query needs to be in format that is compatible with using TemplatePower. THIS IS ONE LINE OF CODE NEEDED TODAY - THAT IS THE WHOLE PROJECT AVAILABLE ON MSN FOR DISCUSSION IF NECCESSARY
Proje No: 46994

Proje hakkında

1 teklif
Uzaktan proje
Son aktiviteden bu yana geçen zaman 18 yıl önce

Biraz para mı kazanmak istiyorsunuz?

Freelancer'da teklif vermenin faydaları

Bütçenizi ve zaman çerçevenizi belirleyin
Çalışmanız için ödeme alın
Teklifinizin ana hatlarını belirleyin
Kaydolmak ve işlere teklif vermek ücretsizdir
1 freelancer bu proje için ortalama $30 USD teklif veriyor
Kullanıcı Avatarı
Hello. Please see PMB for more details. Regards Zend Certified PHP Developer Vladimir Kuznetsov.
$30 USD 0 gün içinde
5,0 (49 değerlendirme)
4,9
4,9

Müşteri hakkında

   UNITED KINGDOM bayrağı
Crieff, United Kingdom
5,0
47
Ödeme yöntemi onaylandı
May 19, 2005 tarihinden bu yana üye

Müşteri Doğrulaması

Teşekkürler! Ücretsiz kredinizi talep etmeniz için size bir bağlantı gönderdik.
E-postanız gönderilirken bir şeyler yanlış gitti. Lütfen tekrar deneyin.
Kayıtlı Kullanıcı İlan Edlien Toplam İş
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Ön izleme yükleniyor
Coğrafik konum için izin verildi.
Giriş oturumunuzun süresi doldu ve çıkış yaptınız. Lütfen tekrar giriş yapın.