[Mysql Question] Select * ... now what? [easy Q w/ REP]
#1

Can someone remind me how I loop through each record from a query result? I have run my query:

pawn Код:
mysql_format(sql, qry, sizeof(qry), "SELECT * FROM properties");
    mysql_tquery(sql, qry, "LoadPropertyData");
Then how do I access each row allowing me to extract the data and put into an enum array.

pawn Код:
public LoadPropertyData(){


}
I'm using this: https://sampwiki.blast.hk/wiki/MySQL/R33
Reply
#2

cache_num_rows() has the number of rows.

use a for loop to go through all of em (< cache_num_rows)
Reply
#3

Quote:
Originally Posted by iLearner
Посмотреть сообщение
cache_num_rows() has the number of rows.

use a for loop to go through all of em (< cache_num_rows)
Thankyou, kind sir!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)