Weird MySQL ..
#1

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!
Reply
#2

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.
Reply
#3

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?
Reply
#4

:S...

Anyone else?
Reply
#5

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.
Reply
#6

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 ..
Reply
#7

It should be LIMIT 12, 12
You want to select 12 from row 12, not 24 from row 12
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)