anonīms Posted October 22, 2009 Report Share Posted October 22, 2009 (edited) // izvelkam patreizeejo ranku $ranks = mysql_query("SELECT *, reitings AS myrating, (SELECT COUNT(DISTINCT(reitings))+1 FROM ".PREFIX."komandas WHERE reitings>myrating) AS rank FROM ".PREFIX."komandas WHERE id = '".intval($vk['id'])."'") or die(mysql_error()); $ranks = mysql_fetch_array($ranks); Viss ir ok, ja reitings no 0-999, bet kad aiziet virs tūkstoša tā komanda vairs nerādas pirmajā vietā, bet parādas kā pēdējā.. kur varētu būt vaina? Edited October 22, 2009 by anonīms Link to comment Share on other sites More sharing options...
waplet Posted October 22, 2009 Report Share Posted October 22, 2009 varbūt tomēr viss kods? Link to comment Share on other sites More sharing options...
anonīms Posted October 22, 2009 Author Report Share Posted October 22, 2009 (edited) tas arī ir viss kods, kas nepieciešams. kļūda ir kaut kur šeit. pārejam kodam ar to nav nekāda sakara. EDIT: arvien tizlāks un tizlāks. kollonas lauks bija varchar. Edited October 22, 2009 by anonīms Link to comment Share on other sites More sharing options...
Recommended Posts