Jump to content
  • 0

query_sql change 128rows to more


Question

Posted (edited)

http://rathena.org/wiki/Query_sql

this only returns 128. How to change array size? I want to have 500rows or more

tried

set .@nb, query_sql("SELECT name, fame FROM `char` ORDER BY fame DESC", .@name$, .@fame);
mes "Hall Of Fame";
for(set .@i,1; .@i <= .@nb; set .@i,.@i+1)
mes .@i+". "+.@name$[.@i-1]+" ("+.@fame[.@i-1]+")";

Sorry for the bad english.

Edited by mleo1

3 answers to this question

Recommended Posts

Posted

I got what I want, I just needed to see all the rows. But thanks for the support again Emistry xD.

just sharing

mes "Test";
set .@start, 0;
while(1){		
	set .@nb, query_sql("SELECT `name` FROM `char` ORDER BY `char_id` LIMIT " +.@start+ ",128", .@name$);
	if(.@nb==0)
		break;

	mes (.@start+1) +" to "+ (.@start+128);
	for(set .@i,1; .@i <= .@nb; set .@i,.@i+1)
		mes (.@i+.@start) +". "+ .@name$[.@i-1];

	deletearray .@name$, getarraysize(.@name$);
	set .@start, .@start+128;
	next;
}
close;

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...