My console stop right after mysql_query(query)
#10

I'm not familiar with that plugin, and I don't know which function moves the internal current result pointer. You can't use the database id's as array indexes, because they are very dynamic (well, that depends on implementation, but that's not important).

pawn Код:
new
    str[512]
;

mysql_query("SELECT * FROM houses");
mysql_store_result();
for(new hid = 0; hid != MAX_HOUSES && mysql_fetch_row(str, "|"); ++hid) {
    mysql_fetch_field("id", str);
    HouseInfo[hid][hId] = strval(str);
    //Further things
}
mysql_free_result();
Something like this. But, doesn't mysql_fetch_row return whole row at once? Why do you have to use mysql_fetch_field instead of splitting that one? I think there was some method using sscanf, but I can't remember where it was described now.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)