bandi94 Posted December 9, 2013 Share Posted December 9, 2013 I am using SQLite , to store some topTime's. ATM i am using 'ORDER BY timeMs ASC LIMIT 10' to get the first TOP 10 time's without putt all row's in a table and use sort. Now i wanna use "Select..... Where playerSerial=?" and get the rank for that player by the timeMs column without load all row's in a table , sort it , and search for the Serial then the rank would be "i". Something like : Select..... Where playerSerial=? RETURN ORDER BY timeMs ASC" Is it possbile with some SQLite command (assuming that the row's are not ordered by the TimeMs column) ? Link to comment
Spajk Posted December 9, 2013 Share Posted December 9, 2013 I dont understand you... You want to show player's rank when showing that top-times list? What playerSerial has to do with it? Link to comment
Desaster Posted December 9, 2013 Share Posted December 9, 2013 as I understand you you wanna get a table then sort it but you want to show just the top then ok then you could use this links read them carefully viewtopic.php?f=91&t=68164 viewtopic.php?f=91&t=68090 Link to comment
bandi94 Posted December 10, 2013 Author Share Posted December 10, 2013 Nope let me explain. I am rescripting the TopTime's , to don't lose the old time's i will use the race_toptimes system . To show the first top 10 time's without use table / sort i use "ORDER BY timeMs ASC LIMIT 10" -- this will return 10 row's the row's are already sorted bk of the "ORDER BY timeMs ASC" command. Now on the last line of the topTime i wanna , show the player's rank (if you are not in top10 then on the last line will show "Top 25 - Yourname" , now to search the player's rank i will use the playerSerial column(race_toptime's already saved the playerSerial for all time's) so to do this i will need to get all time's in a tabel then use table.sort then loop trough and mach the serial if i found a mach it mean's that the top time is from that player. I wanna cut off the table.sort , and use SQLite command to do that. (the SQLite SelectCommand would return the rank) Example: PlayerName1 1.30 PlayerName2 1.45 .......... Now let's say i am PlayerName1 , and i am rank 2 , to find out this thing i would need to use table.sort , but i am woundering if SLQlite could do this for me like. "Select * Where playerSerial=? RETURN ORDER BY timeMs ASC" -- and this would return the data + number"2" from command "RETURN" bk "ORDER BY timeMs ASC" + "WHERE" command , would find me as TOP2 By timeMs Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now