simplynice Posted March 14, 2013 Group: Members Topic Count: 25 Topics Per Day: 0.01 Content Count: 128 Reputation: 4 Joined: 11/14/11 Last Seen: April 13, 2016 Share Posted March 14, 2013 how about we add this every time we do the for loop: set .@int, .@int++; // just like php and other programming language How about: set .@int, mysql_num_rows; // count the number of rows Quote Link to comment Share on other sites More sharing options...
Brian Posted March 14, 2013 Group: Members Topic Count: 75 Topics Per Day: 0.02 Content Count: 2223 Reputation: 593 Joined: 10/26/11 Last Seen: June 2, 2018 Share Posted March 14, 2013 set .@int, .@int++; // just like php and other programming language rAthena already supports increment and decrement operators since r15982. set .@int, mysql_num_rows; // count the number of rows query_sql already returns the number of rows returned by a SELECT query. Example: set .@num_rows, query_sql("SELECT `name` FROM `char` WHERE `name` LIKE '%test%'", .@name$); mes .@num_rows + " names contain the word *test*"; 1 Quote Link to comment Share on other sites More sharing options...
simplynice Posted March 15, 2013 Group: Members Topic Count: 25 Topics Per Day: 0.01 Content Count: 128 Reputation: 4 Joined: 11/14/11 Last Seen: April 13, 2016 Author Share Posted March 15, 2013 Thank you for this! Quote Link to comment Share on other sites More sharing options...
Question
simplynice
how about we add this every time we do the for loop:
set .@int, .@int++; // just like php and other programming language
How about:
set .@int, mysql_num_rows; // count the number of rows
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.