MySQL Problem.

Wichtiger Hinweis: Bitte ändert nicht manuell die Schriftfarbe auf schwarz sondern belasst es bei der Standardeinstellung. Somit tragt ihr dazu bei dass euer Text auch bei Verwendung unseren dunklen Forenstils noch lesbar ist!

Tipp: Ihr wollt längere Codeausschnitte oder Logfiles bereitstellen? Benutzt unseren eigenen PasteBin-Dienst Link
  • Hallo ich habe ein Problem undzwar: [19.01.2014 18:46:01] [MySQL] Error (0): Failed to store result.
    [19.01.2014 18:46:01] [MySQL] Error (0): Function: mysql_num_rows called when no result stored.


    woran liegt es an das hier ? new idx;
    mysql_query("SELECT * FROM `haussystem` WHERE hOwner = '%s'",HouseInfo[idx][hOwner]);
    mysql_store_result();
    if(mysql_num_rows())
    {
    while (idx < sizeof(HouseInfo))
    {
    HouseInfo[idx][hEntrancex] = mysql_GetIntByString("haussystem", "hEntrancex", "hOwner",HouseInfo[idx][hOwner]);
    HouseInfo[idx][hEntrancey] = mysql_GetIntByString("haussystem", "hEntrancey", "hOwner",HouseInfo[idx][hOwner]);
    HouseInfo[idx][hEntrancez] = mysql_GetIntByString("haussystem", "hEntrancez", "hOwner",HouseInfo[idx][hOwner]);
    HouseInfo[idx][hExitx] = mysql_GetIntByString("haussystem", "hExitx", "hOwner",HouseInfo[idx][hOwner]);
    HouseInfo[idx][hExity] = mysql_GetIntByString("haussystem", "hExity", "hOwner",HouseInfo[idx][hOwner]);
    HouseInfo[idx][hExitz] = mysql_GetIntByString("haussystem", "hExitz", "hOwner",HouseInfo[idx][hOwner]);
    HouseInfo[idx][hHealthx] = mysql_GetIntByString("haussystem", "hHealthx", "hOwner",HouseInfo[idx][hOwner]);
    HouseInfo[idx][hHealthy] = mysql_GetIntByString("haussystem", "hHealthy", "hOwner",HouseInfo[idx][hOwner]);
    HouseInfo[idx][hHealthz] = mysql_GetIntByString("haussystem", "hHealthz", "hOwner",HouseInfo[idx][hOwner]);
    HouseInfo[idx][hArmourx] = mysql_GetIntByString("haussystem", "hArmourx", "hOwner",HouseInfo[idx][hOwner]);
    HouseInfo[idx][hArmoury] = mysql_GetIntByString("haussystem", "hArmoury", "hOwner",HouseInfo[idx][hOwner]);
    HouseInfo[idx][hArmourz] = mysql_GetIntByString("haussystem", "hArmourz", "hOwner",HouseInfo[idx][hOwner]);
    HouseInfo[idx][hDiscription] = mysql_GetIntByString("haussystem", "hDiscription", "hOwner",HouseInfo[idx][hOwner]);
    HouseInfo[idx][hValue] = mysql_GetIntByString("haussystem", "hValue", "hOwner",HouseInfo[idx][hOwner]);
    HouseInfo[idx][hHel] = mysql_GetIntByString("haussystem", "hHel", "hOwner",HouseInfo[idx][hOwner]);
    HouseInfo[idx][hLock] = mysql_GetIntByString("haussystem", "hLock", "hOwner",HouseInfo[idx][hOwner]);
    HouseInfo[idx][hInt] = mysql_GetIntByString("haussystem", "hInt", "hOwner",HouseInfo[idx][hOwner]);
    HouseInfo[idx][hOwned] = mysql_GetIntByString("haussystem", "hOwned", "hOwner",HouseInfo[idx][hOwner]);
    HouseInfo[idx][hRooms] = mysql_GetIntByString("haussystem", "hRooms", "hOwner",HouseInfo[idx][hOwner]);
    HouseInfo[idx][hRent] = mysql_GetIntByString("haussystem", "hRent", "hOwner",HouseInfo[idx][hOwner]);
    HouseInfo[idx][hRentabil] = mysql_GetIntByString("haussystem", "hRentabil", "hOwner",HouseInfo[idx][hOwner]);
    HouseInfo[idx][hTakings] = mysql_GetIntByString("haussystem", "hTakings", "hOwner",HouseInfo[idx][hOwner]);
    HouseInfo[idx][hVec] = mysql_GetIntByString("haussystem", "hVec", "hOwner",HouseInfo[idx][hOwner]);
    if(HouseInfo[idx][hVec] == 457)
    {
    HouseInfo[idx][hVec] = 411;
    }
    HouseInfo[idx][hVcol1] = mysql_GetIntByString("haussystem", "hVcol1", "hOwner",HouseInfo[idx][hOwner]);
    HouseInfo[idx][hVcol2] = mysql_GetIntByString("haussystem", "hVcol2", "hOwner",HouseInfo[idx][hOwner]);
    HouseInfo[idx][hDate] = mysql_GetIntByString("haussystem", "hDate", "hOwner",HouseInfo[idx][hOwner]);
    HouseInfo[idx][hLevel] = mysql_GetIntByString("haussystem", "hLevel", "hOwner",HouseInfo[idx][hOwner]);
    HouseInfo[idx][hWorld] = mysql_GetIntByString("haussystem", "hWorld", "hOwner",HouseInfo[idx][hOwner]);
    idx++;
    }
    mysql_free_result();
    }

  • ok, jetzt geht es aber wenn ich in der tabelle etwas eintrage kommt der fehler wenn ich den server restarte: [MySQL] Error (0): Function: mysql_fetch_field failed, no field data.
    [19.01.2014 20:53:14] [MySQL] Error (0): Function: mysql_fetch_field failed, no field data.
    [19.01.2014 20:53:14] [MySQL] Error (0): Function: mysql_fetch_field failed, no field data.
    hier die zeilen die ich geändert habe new idx;
    mysql_query("SELECT * FROM `haussystem`");
    mysql_store_result();
    if(mysql_num_rows())
    {
    while (idx < sizeof(HouseInfo))
    {
    HouseInfo[idx][hEntrancex] = mysql_GetFloatByString("haussystem", "hEntrancex", "hOwner",HouseInfo[idx][hOwner]);
    HouseInfo[idx][hEntrancey] = mysql_GetFloatByString("haussystem", "hEntrancey", "hOwner",HouseInfo[idx][hOwner]);
    HouseInfo[idx][hEntrancez] = mysql_GetFloatByString("haussystem", "hEntrancez", "hOwner",HouseInfo[idx][hOwner]);


    HouseInfo[idx][hExitx] = mysql_GetFloatByString("haussystem", "hExitx", "hOwner",HouseInfo[idx][hOwner]);
    HouseInfo[idx][hExity] = mysql_GetFloatByString("haussystem", "hExity", "hOwner",HouseInfo[idx][hOwner]);
    HouseInfo[idx][hExitz] = mysql_GetFloatByString("haussystem", "hExitz", "hOwner",HouseInfo[idx][hOwner]);


    HouseInfo[idx][hHealthx] = mysql_GetIntByString("haussystem", "hHealthx", "hOwner",HouseInfo[idx][hOwner]);
    HouseInfo[idx][hHealthy] = mysql_GetIntByString("haussystem", "hHealthy", "hOwner",HouseInfo[idx][hOwner]);
    HouseInfo[idx][hHealthz] = mysql_GetIntByString("haussystem", "hHealthz", "hOwner",HouseInfo[idx][hOwner]);


    HouseInfo[idx][hArmourx] = mysql_GetIntByString("haussystem", "hArmourx", "hOwner",HouseInfo[idx][hOwner]);
    HouseInfo[idx][hArmoury] = mysql_GetIntByString("haussystem", "hArmoury", "hOwner",HouseInfo[idx][hOwner]);
    HouseInfo[idx][hArmourz] = mysql_GetIntByString("haussystem", "hArmourz", "hOwner",HouseInfo[idx][hOwner]);


    HouseInfo[idx][hDiscription] = mysql_GetIntByString("haussystem", "hDiscription", "hOwner",HouseInfo[idx][hOwner]);
    HouseInfo[idx][hValue] = mysql_GetIntByString("haussystem", "hValue", "hOwner",HouseInfo[idx][hOwner]);
    HouseInfo[idx][hHel] = mysql_GetIntByString("haussystem", "hHel", "hOwner",HouseInfo[idx][hOwner]);
    HouseInfo[idx][hLock] = mysql_GetIntByString("haussystem", "hLock", "hOwner",HouseInfo[idx][hOwner]);
    HouseInfo[idx][hInt] = mysql_GetIntByString("haussystem", "hInt", "hOwner",HouseInfo[idx][hOwner]);
    HouseInfo[idx][hOwned] = mysql_GetIntByString("haussystem", "hOwned", "hOwner",HouseInfo[idx][hOwner]);
    HouseInfo[idx][hRooms] = mysql_GetIntByString("haussystem", "hRooms", "hOwner",HouseInfo[idx][hOwner]);
    HouseInfo[idx][hRent] = mysql_GetIntByString("haussystem", "hRent", "hOwner",HouseInfo[idx][hOwner]);
    HouseInfo[idx][hRentabil] = mysql_GetIntByString("haussystem", "hRentabil", "hOwner",HouseInfo[idx][hOwner]);
    HouseInfo[idx][hTakings] = mysql_GetIntByString("haussystem", "hTakings", "hOwner",HouseInfo[idx][hOwner]);
    HouseInfo[idx][hVec] = mysql_GetIntByString("haussystem", "hVec", "hOwner",HouseInfo[idx][hOwner]);
    if(HouseInfo[idx][hVec] == 457)
    {
    HouseInfo[idx][hVec] = 411;
    }
    HouseInfo[idx][hVcol1] = mysql_GetIntByString("haussystem", "hVcol1", "hOwner",HouseInfo[idx][hOwner]);
    HouseInfo[idx][hVcol2] = mysql_GetIntByString("haussystem", "hVcol2", "hOwner",HouseInfo[idx][hOwner]);
    HouseInfo[idx][hDate] = mysql_GetIntByString("haussystem", "hDate", "hOwner",HouseInfo[idx][hOwner]);
    HouseInfo[idx][hLevel] = mysql_GetIntByString("haussystem", "hLevel", "hOwner",HouseInfo[idx][hOwner]);
    HouseInfo[idx][hWorld] = mysql_GetIntByString("haussystem", "hWorld", "hOwner",HouseInfo[idx][hOwner]);
    idx++;
    }
    }
    else
    {
    }
    mysql_free_result();