26.07.2013, 19:36
Quote:
EDIT: I've solved on loading integer and float infos, but not on strings
Код:
public LoadBiz() { new query[2048], DBResult: Result; Result = db_query(Database,"SELECT * FROM `bizs`"); for(new a;a<db_num_rows(Result);a++) { db_get_field_assoc(Result,"owner",query,sizeof(query)); format(BizInfo[a][bOwner], 30, query); //other code here } } |
(I understand why you're looping)
but try:
pawn Код:
public LoadBiz()
{
new query[2048], DBResult: Result;
Result = db_query(Database,"SELECT * FROM `bizs`");
if(db_num_rows(Result))
{
db_get_field_assoc(Result,"owner",query,sizeof(query));
format(BizInfo[a][bOwner], 30, query);
//other code here
}
}