27.02.2014, 16:48
Quote:
Query is the heaviest thing your gamemode can do (big simplification, but whatever). The less queries fired, the better. With a single query you can fetch all results from multiple various tables (SQL is powerful!). So, instead using one query per house, run one query for all houses, and then map results to your array.
pawn Код:
Keep in mind, that database id shouldn't be your array index. |
I mean I am not sure about that query you've posted. Can you explain how to adapt that in my case?
Код:
mysql_fetch_field("id",savingstring); HouseInfo[hid][hId]=strval(savingstring); mysql_fetch_field("owner",savingstring); strins(HouseInfo[hid][hOwner],savingstring,1); mysql_fetch_field("level",savingstring); HouseInfo[hid][hLevel]=strval(savingstring);