got a num of row in mysql
#1

i work on a clan system, and i want to set id for clans. and i want to got the number of the row in my sql.
if the table is like this:
Clan1 5
Clan2 3
Clan3 4
Clan4 1
so i want to got the number of row where ClanName = Clan2 for exemple.
the number need to be 1/2
sorry about the bad english.
Reply
#2

someone?
Reply
#3

here's an exemple :

pawn Код:
mysql_query("SELECT NULL FROM table1");
mysql_store_result();
new rows = mysql_num_rows();
mysql_free_result();
 
printf("There are %d rows in table1",rows);
Reply
#4

Quote:
Originally Posted by Ramoboss
Посмотреть сообщение
here's an exemple :

pawn Код:
mysql_query("SELECT NULL FROM table1");
mysql_store_result();
new rows = mysql_num_rows();
mysql_free_result();
 
printf("There are %d rows in table1",rows);
tanks buy its dont what i mean.
i want to got the number of a spesipic row.
Reply
#5

dude, you have to replace table1 by the table of your clan, and you get the number of the rows in this table
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)