sql command
Hello i would like to have som help with an sql command.
This is my table : Code:
id int(10) NO PRI NULL auto_incrementI would like an sql that reads out a list/array with how many kills, deaths and suisude every person have in the past week. is it possible to make that in one sql command or do i have to make an sql for each value and player. The thing is that if i have to make it with one sql/player then it would be 90 sql commands each visit and im guesing thats not so fun for the server :) BR. Jonas |
Re: sql command
kill count:
Code:
select count(*) from YOUR_TABLE where steamid_killer != steamid_victim and steamid_killer = 'STEAM_BLA'Code:
select count(*) from YOUR_TABLE where steamid_killer != steamid_victim and steamid_victim = 'STEAM_BLA'Code:
select count(*) from YOUR_TABLE where steamid_killer == steamid_victim and steamid_victim = 'STEAM_BLA'*edit* atm you dont have any date check here because i dont know which sql server you are using, so i cant know which functions they have for date/time |
Re: sql command
i already have those sql commands on the individual score page.
example http://www.colbro.se/cs but the thing i would like is to sort the user by kill ratio in the first page so the best player is first in the list like a top 30 list this week |
Re: sql command
Someone that know if this works??
|
Re: sql command
which sql statement are you using?
same as mine? if yes just add "order by 1 desc" |
Re: sql command
The thing is i want all that you wrote above but in one single sql statemant if possible so i have everything in my recset so i can loop out the top 10 list from a single sql.
I dont know if its even possible but i t would be godd if you have a solution or somone else. BR. jonas |
Re: sql command
No more ideas???
|
| All times are GMT -4. The time now is 16:10. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.