MySQL Updated nicht ..

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
  • Hey,


    ich will meine Locations abspeichern lassen (bzw nur das 'CurrentLoad'), jedoch speichert MySQL die nicht.
    Ich das MySQL-R7 von BlueG.
    stock SaveLocations()
    {
    new query[128];
    for(new i=0; i<MAX_LOCATIONS; i++){
    if(MissionLocation[i][isset]==false)continue;
    format(query,128,"UPDATE `locations` SET `CurrentLoad` = '%i' WHERE `id` = '%i'",MissionLocation[i][CurrentLoad],MissionLocation[i][sqlid]);
    print(query);
    mysql_function_query(sqlcon, query, true, "", "");
    }
    return 1;
    }


    Meine Konsole zeigt die dann richtig an.
    [19:13:00] UPDATE `locations` SET `CurrentLoad` = '0' WHERE `id` = '49'
    [19:13:00] UPDATE `locations` SET `CurrentLoad` = '0' WHERE `id` = '50'
    [19:13:00] UPDATE `locations` SET `CurrentLoad` = '500' WHERE `id` = '51'
    [19:13:00] UPDATE `locations` SET `CurrentLoad` = '5890' WHERE `id` = '52'


    Jedoch sind die in der Datenbank dann immernoch 0.
    Mache ich da iwas falsch ? 8|


    //€dit:
    Das hier sagt meine MySQL-Log dazu.

    Code
    [19:12:58] >> mysql_connect(127.0.0.1, root, samp, ******) on port 3306[19:12:58] CMySQLHandler::CMySQLHandler() - constructor called.[19:12:58] CMySQLHandler::CMySQLHandler() - Connecting to "127.0.0.1" | DB: "samp" | Username: "root"[19:12:58] CMySQLHandler::Connect() - Connection was successful.[19:12:58] CMySQLHandler::Connect() - Auto-Reconnect has been enabled.[19:12:58] >> mysql_ping( Connection handle: 1 )[19:12:58] CMySQLHandler::Ping() - Connection is still alive.[19:12:58]  [19:12:58]  ** MySQL Debugging enabled (12/09/13)[19:12:58]  [19:12:58] >> mysql_query_callback( Connection handle: 1 )[19:12:58] Passing query SELECT * FROM `locations` | [19:12:58] ProcessQueryThread(LoadLocationsQuery) - Query was successful. (SELECT * FROM `locations`)[19:12:58] ProcessQueryThread(LoadLocationsQuery) - Data caching enabled.[19:12:58] CMySQLHandler::StoreResult() - Result was stored.[19:12:58] CMySQLHandler::FreeResult() - Result was successfully free'd.[19:12:58] CMySQLHandler::ProcessQueryThread() - Data is getting passed to ->ProcessTick()[19:12:58] LoadLocationsQuery() - Threaded function called.[19:12:58] >> cache_get_data( Connection handle: 1 )[19:12:58] ProcessTick() - The cache has been cleared.[19:13:00] >> mysql_query_callback( Connection handle: 1 )[19:13:00] >> mysql_query_callback( Connection handle: 1 )[19:13:00] Passing query UPDATE `locations` SET `CurrentLoad` = '0' WHERE `id` = '49' | [19:13:00] >> mysql_query_callback( Connection handle: 1 )[19:13:00] >> mysql_query_callback( Connection handle: 1 )[19:13:00] >> mysql_close( Connection handle: 1 )[19:13:00] CMySQLHandler::~CMySQLHandler() - deconstructor called.[19:13:00] CMySQLHandler::FreeResult() - The result is already empty.[19:13:00] CMySQLHandler::Disconnect() - Connection was closed.