Weird MySQL .. -
GamingTurf - 15.12.2011
pawn Код:
format(query, sizeof(query), "SELECT `airlinerank`, `username`, `earntforairline` FROM `users` WHERE `airline`='%d' ORDER BY `airlinerank` DESC LIMIT 12, 24", LookingAtAirline[playerid]);
mysql_query(query);
mysql_store_result();
Why does this result in 24 rows, instead of 12 rows?
Really, really weird.
Код:
[15:50:40] CMySQLHandler::Query(SELECT `airlinerank`, `username`, `earntforairline` FROM `users` WHERE `airline`='1' ORDER BY `airlinerank` DESC LIMIT 12, 24) - Successfully executed.
And after it - results in 24 rows, instead of what i wanted:
12 rows.
Anyone spot something wrong? It displays them fine, but too many of them!
Re: Weird MySQL .. -
GamingTurf - 15.12.2011
It's already shown 12 rows in a previous dialog. Now, i'd like it to show the
NEXT 12 rows, so it would be from 0-12 (already seen), to 12-24 (trying to show), however it shows ALL 24, instead of 12.
Re: Weird MySQL .. -
GamingTurf - 15.12.2011
Nah that won't work at all.. airline is either 0, 1, 2, 3, 4 or 5 and it's fixed.
Is that the only way to do this?
Re: Weird MySQL .. -
GamingTurf - 15.12.2011
:S...
Anyone else?
Re: Weird MySQL .. -
GamingTurf - 15.12.2011
Well, it's loading members .. There is no specific thing i want to set the range . I want it to load all the members with 'airline' == X, and list it into a dialog, with pages of 12rows per page.
Re: Weird MySQL .. -
GamingTurf - 15.12.2011
I thank you for your help, but i do not think you are helping me at all, you dont understand what is wrong ..
It can't be duplicate, i never had repeated. I told you in the first post that instead of 0,12, it's 12,24, but it's still acting as if it's 0,24.
..
Can someone else understand what is going on? Because sorry, your not helping and your giving me weird ways to things .. meaning i don't think you understand this whole thing ..
Re: Weird MySQL .. -
Johnson_boy - 15.12.2011
It should be LIMIT 12, 12
You want to select 12 from row 12, not 24 from row 12