MySQL - Gives all no value back, but database is filled
#9

Probably not, I'm not long in MySQL yet.

pawn Код:
mysql_query("SELECT * FROM `HouseInfo`");
mysql_store_result();
new h;
while(mysql_fetch_row(result))
{
    mysql_get_field("PickupOutsidePosX",Store); HouseInfo[h][PickupOutsidePosX] = floatstr(Store);
    mysql_get_field("PickupOutsidePosY",Store); HouseInfo[h][PickupOutsidePosY] = floatstr(Store);
    mysql_get_field("PickupOutsidePosZ",Store); HouseInfo[h][PickupOutsidePosZ] = floatstr(Store);
    mysql_get_field("PickupInsidePosX",Store); HouseInfo[h][PickupInsidePosX] = floatstr(Store);
    mysql_get_field("PickupInsidePosY",Store); HouseInfo[h][PickupInsidePosY] = floatstr(Store);
    mysql_get_field("PickupInsidePosZ",Store); HouseInfo[h][PickupInsidePosZ] = floatstr(Store);
    mysql_get_field("SpawnOutsideX",Store); HouseInfo[h][SpawnOutsideX] = floatstr(Store);
    mysql_get_field("SpawnOutsideY",Store); HouseInfo[h][SpawnOutsideY] = floatstr(Store);
    mysql_get_field("SpawnOutsideZ",Store); HouseInfo[h][SpawnOutsideZ] = floatstr(Store);
    mysql_get_field("SpawnOutsideAngle",Store); HouseInfo[h][SpawnOutsideAngle] = floatstr(Store);
    mysql_get_field("SpawnInsideX",Store); HouseInfo[h][SpawnInsideX] = floatstr(Store);
    mysql_get_field("SpawnInsideY",Store); HouseInfo[h][SpawnInsideY] = floatstr(Store);
    mysql_get_field("SpawnInsideZ",Store); HouseInfo[h][SpawnInsideZ] = floatstr(Store);
    mysql_get_field("SpawnInsideAngle",Store); HouseInfo[h][SpawnInsideAngle] = floatstr(Store);
    mysql_get_field("InteriorID",Store); HouseInfo[h][InteriorID] = strval(Store);
    mysql_get_field("Locked",Store); HouseInfo[h][Locked] = strval(Store);
    mysql_get_field("Price",Store); HouseInfo[h][Price] = strval(Store);
    mysql_get_field("Owner",HouseInfo[h][Owner]);
    HouseInfo[h][VirtualWorld] = h;
    HouseInfo[h][Owned] = 1;
    if(!strlen(HouseInfo[h][Owner])) HouseInfo[h][PickupID] = CreateDynamicPickup(1273,23,HouseInfo[h][PickupOutsidePosX],HouseInfo[h][PickupOutsidePosY],HouseInfo[h][PickupOutsidePosZ],-1,-1,-1,200.0);
    else HouseInfo[h][PickupID] = CreateDynamicPickup(1272,23,HouseInfo[h][PickupOutsidePosX],HouseInfo[h][PickupOutsidePosY],HouseInfo[h][PickupOutsidePosZ],-1,-1,-1,200.0);
    printf("House File ID %d has been created",h);
    h++;
}
mysql_free_result();
Wouldn't that do the same...
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 5 Guest(s)