#1

How do I caculate the amount of X I have
For example I have 200ids of houses created in the SQL database going like:
1
2
3
4
5
6
7
8
blablabla
How do I calculate the last ID, or the amount of IDs all together as in if I have 200 houses
It will give out: "200" or if i have 1 house it will give out "1"
Reply
#2

Give an example, but I'd say sizeof()?
Reply
#3

i already gave u an example, just how do you make the PAWN calculate how many houses are there in the SQL houses 'folder'
Just so whenever i create a house it updates the MAX_HOUSES array or something
Reply
#4

Do your query (insert or delete) house, when delete just -1, when insert +1. If you want a total, then make a query that selects everything, and see effected rows?
Reply
#5

Use:
pawn Код:
mysql_num_rows(MYSQL: handle);
Reply
#6

Quote:
Originally Posted by RyDeR`
Посмотреть сообщение
Use:
pawn Код:
mysql_num_rows(MYSQL: handle);
^Thats the best, mine doesn't really make sense when i think about it.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)