Hallo,
Ich wollte mein Bizzsystem von INI auf MySQL umändern doch irgendwie naja klappt es nicht..
Ich möchte gerne wissen ob dies richtig sei.
public LoadBizz()
{
new idx;
for(; idx < MAX_Bizz;)
{
new string[128];
format(string,sizeof(string),"SELECT * FROM bizz WHERE bID = '%d'",idx);
mysql_query(string);
mysql_store_result();
new result[50];
while(mysql_fetch_row()) //this will be running until all rows are processed
{
mysql_fetch_field_row("bOwned", BizzInfo[idx][bOwned]);
mysql_fetch_field_row("bEntranceX", result);
BizzInfo[idx][bEntranceX] = floatstr(result);
mysql_fetch_field_row("bEntranceY", result);
BizzInfo[idx][bEntranceY] = floatstr(result);
mysql_fetch_field_row("bEntranceZ", result);
BizzInfo[idx][bEntranceZ] = floatstr(result);
mysql_fetch_field_row("bExitX", result);
BizzInfo[idx][bExitX] = floatstr(result);
mysql_fetch_field_row("bExitY", result);
BizzInfo[idx][bExitY] = floatstr(result);
mysql_fetch_field_row("bExitZ", result);
BizzInfo[idx][bExitZ] = floatstr(result);
mysql_fetch_field_row("bLevelNeeded", BizzInfo[idx][bLevelNeeded]);
mysql_fetch_field_row("bBuyPrice", BizzInfo[idx][bBuyPrice]);
mysql_fetch_field_row("bEntranceCost", BizzInfo[idx][bEntranceCost]);
mysql_fetch_field_row("bTill", BizzInfo[idx][bTill]);
mysql_fetch_field_row("bLocked", BizzInfo[idx][bLocked]);
mysql_fetch_field_row("bInterior", BizzInfo[idx][bInterior]);
mysql_fetch_field_row("bProducts", BizzInfo[idx][bProducts]);
mysql_fetch_field_row("bMaxProducts", BizzInfo[idx][bMaxProducts]);
mysql_fetch_field_row("bPriceProd", BizzInfo[idx][bPriceProd]);
printf("BizzInfo:%d Owner:%s Message:%s Entfee:%d Till:%d Products:%d/%d Interior:%d.",
idx,
BizzInfo[idx][bOwner],
BizzInfo[idx][bMessage],
BizzInfo[idx][bEntranceCost],
BizzInfo[idx][bTill],
BizzInfo[idx][bProducts],
BizzInfo[idx][bMaxProducts],
BizzInfo[idx][bInterior]);
idx++;
}
}
print("string");
return 1;
}
MFG GamerXIOS ♥