MySQL stellt keine verbindung zu mysql_car

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,
    bei mien Script verbindet der server nicht zur mysql_car.
    Aber bei allen anderen verbindet er es.


    // Connect to the database.
    mysql_connect(dbhost, dbuser, dbpw, dbdb, mysql,1);
    mysql_connect(dbhost,dbuser,dbpw,dbdb,mysql_save,1);
    mysql_connect(dbhost,dbuser,dbpw,dbdb,mysql_car,1);
    mysql_connect(dbhost,dbuser,dbpw,dbdb,mysql_load,1);
    dummyQuery();


    mysql = mysql_init(LOG_ONLY_ERRORS);
    mysql_save = mysql_init(LOG_ONLY_ERRORS);
    mysql_car = mysql_init(LOG_ALL);
    mysql_load = mysql_init(LOG_ONLY_ERRORS);


    new MySQL:mysql;
    new MySQL:mysql_save;
    new MySQL:mysql_car;
    new MySQL:mysql_load;


    stock dummyQuery()
    {
    printf("DummyQuery wurde aufgerufen.");
    mysql_query("UPDATE user SET id='1' WHERE id='1'");
    mysql_query("UPDATE user SET id='1' WHERE id='1'",-1,0,mysql_save);
    mysql_query("UPDATE user SET id='1' WHERE id='1'",-1,0,mysql_car);
    mysql_query("UPDATE user SET id='1' WHERE id='1'",-1,0,mysql_load);
    return 1;
    }


    stock loadPlayerAutos(playerid)
    {
    format(query,sizeof(query),"SELECT * FROM autos WHERE besitzer='%s' AND laden='1'",SpielerName(playerid));
    mysql_query(query,777,playerid,mysql_car);
    return 1;
    }


    case 1234:
    {
    mysql_store_result(mysql_car);
    //new spareid=spareid;
    new loadvehs=4;
    if(SpielerInfo[spareid][pRank]>0){loadvehs=6;}
    new x=0;
    while(mysql_fetch_row(data,"|",mysql_car))
    {
    if(x==loadvehs){mysql_free_result(mysql_car);return 1;}
    new id=getFreePlayerAuto();
    sscanf(data, "p<|>is[40]iffffiiiffffs[64]iiis[10]iiiiiiiiiiiiiiiiiiiiiifiiiis[64]s[64]s[64]s[64]s[64]iiiffff",PlayerAuto[id][d_id],PlayerAuto[id][vkey],PlayerAuto[id][vmodel],PlayerAuto[id][v_xc],PlayerAuto[id][v_yc],PlayerAuto[id][v_zc],PlayerAuto[id][v_ac],PlayerAuto[id][vfarbe1],PlayerAuto[id][vfarbe2],PlayerAuto[id][preis],
    PlayerAuto[id][a_x],PlayerAuto[id][a_y],PlayerAuto[id][a_z],PlayerAuto[id][a_a],PlayerAuto[id][car_grund],PlayerAuto[id][benzin],PlayerAuto[id][kaputt],PlayerAuto[id][angemeldet],PlayerAuto[id][kennzeichen],PlayerAuto[id][vmod0],PlayerAuto[id][vmod1],PlayerAuto[id][vmod2],PlayerAuto[id][vmod3],PlayerAuto[id][vmod4],
    PlayerAuto[id][vmod5],PlayerAuto[id][vmod6],PlayerAuto[id][vmod7],PlayerAuto[id][vmod8],PlayerAuto[id][vmod9],PlayerAuto[id][vmod10],PlayerAuto[id][vmod11],PlayerAuto[id][vmod12],PlayerAuto[id][vmod13],PlayerAuto[id][paintjob],PlayerAuto[id][car_mats],PlayerAuto[id][car_hanf],PlayerAuto[id][car_lsd],PlayerAuto[id][car_lunch],PlayerAuto[id][car_c4],PlayerAuto[id][car_koks],
    PlayerAuto[id][neon],PlayerAuto[id][car_distance],PlayerAuto[id][car_pizza0],PlayerAuto[id][car_pizza1],PlayerAuto[id][car_laden],PlayerAuto[id][lastwechsel],PlayerAuto[id][key1],PlayerAuto[id][key2],PlayerAuto[id][key3],PlayerAuto[id][key4],PlayerAuto[id][key5],PlayerAuto[id][car_abtime],PlayerAuto[id][calarm],PlayerAuto[id][finder],PlayerAuto[id][lastx],PlayerAuto[id][lasty],PlayerAuto[id][lastz],PlayerAuto[id][lastr]);
    PlayerAuto[id][id_x] = CreateVehicleEx(PlayerAuto[id][vmodel],PlayerAuto[id][v_xc],PlayerAuto[id][v_yc],PlayerAuto[id][v_zc],PlayerAuto[id][v_ac],PlayerAuto[id][vfarbe1],PlayerAuto[id][vfarbe2],-1);
    RespawnVehicle(499,PlayerAuto[id][id_x]);
    //Kofferraum
    carLSD[PlayerAuto[id][id_x]]=PlayerAuto[id][car_lsd];
    carKoks[PlayerAuto[id][id_x]]=PlayerAuto[id][car_koks];
    carHanf[PlayerAuto[id][id_x]]=PlayerAuto[id][car_hanf];
    carMats[PlayerAuto[id][id_x]]=PlayerAuto[id][car_mats];
    carC4[PlayerAuto[id][id_x]]=PlayerAuto[id][car_c4];
    carLunch[PlayerAuto[id][id_x]]=PlayerAuto[id][car_lunch];
    carPizza[0][PlayerAuto[id][id_x]]=PlayerAuto[id][car_pizza0];
    carPizza[1][PlayerAuto[id][id_x]]=PlayerAuto[id][car_pizza1];
    istkaputt[PlayerAuto[id][id_x]]=PlayerAuto[id][kaputt];
    distanz[PlayerAuto[id][id_x]]=PlayerAuto[id][car_distance];
    FahrzeugTunen(PlayerAuto[id][id_x]);
    lockVehicle(PlayerAuto[id][id_x]);
    format(string,sizeof(string),"%s-%d",PlayerAuto[id][kennzeichen],PlayerAuto[id][id_x]);
    if(PlayerAuto[id][angemeldet]==1)
    {
    SetVehicleNumberPlateEx(PlayerAuto[id][id_x],string);
    }
    else
    {
    SetVehicleNumberPlateEx(PlayerAuto[id][id_x],"{FF0000}-NA-");
    }
    tank[PlayerAuto[id][id_x]]=PlayerAuto[id][benzin];
    printf("Fahrzeug : %d (ID:%d) geladen und gefunden. [BESITZER : %s]",id,PlayerAuto[id][id_x],PlayerAuto[id][vkey]);
    //zähler erhöhen
    x++;
    }
    mysql_free_result(mysql_car);
    return 1;
    }


    Danke im vorraus für die hilfe!


    Mfg

  • Es reicht wenn du mysql_connect ein einziges Mal verwendest. Du nutzt ja nur unterschiedliche Tabellen, keine anderen Datenbanken.
    Mach das hier weg:
    mysql_connect(dbhost,dbuser,dbpw,dbdb,mysql_save,1);
    mysql_connect(dbhost,dbuser,dbpw,dbdb,mysql_car,1);
    mysql_connect(dbhost,dbuser,dbpw,dbdb,mysql_load,1);


    new MySQL:mysql_save;
    new MySQL:mysql_car;
    new MySQL:mysql_load;


    Und alles was dazu gehört.
    Das kannst du alles mit "mysql" ersetzen.

  • Doch, wenn du 3 der 4 weg machst stellt er ja trotzdem noch eine Verbindung her. Du brauchst aber keine 4 Verbindungen zur gleichen Datenbank, das macht keinen Sinn.
    Das wäre in etwa so, wie wenn du eine Microsoft Word Datei 4 mal öffnest, das machst du ja auch nicht.

  • Der Server ist nun gecrasht.


    Was soll ich jetzt tuhn?


    Mfg


    #EDIT
    :31:38] [MySQL] Error (0): Function: mysql_free_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_query called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_store_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_num_rows called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_free_result called when not connected to any database.
    [18:31:38] Anmeldung für Dner111 ist komplett fertig (10ms).
    [18:31:38] [MySQL] Error (0): Function: mysql_query called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_store_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_num_rows called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_free_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_query called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_query called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_store_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_num_rows called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_free_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_query called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_query called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_free_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_query called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_store_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_fetch_field called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_fetch_field called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_fetch_field called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_free_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_query called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_store_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_num_rows called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_free_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_query called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_store_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_num_rows called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_free_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_query called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_store_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_num_rows called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_free_result called when not connected to any database.
    [18:31:38] Für Dner111 werden Autos geladen.
    [18:31:38] [MySQL] Error (0): Function: mysql_query called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_store_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_num_rows called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_free_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_query called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_store_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_num_rows called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_free_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_query called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_store_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_num_rows called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_free_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_query called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_store_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_num_rows called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_free_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_query called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_store_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_num_rows called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_free_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_query called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_store_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_num_rows called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_free_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_query called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_store_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_num_rows called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_free_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_query called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_store_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_num_rows called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_free_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_query called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_store_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_num_rows called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_free_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_query called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_store_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_num_rows called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_free_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_query called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_store_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_num_rows called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_free_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_query called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_store_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_num_rows called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_free_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_query called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_store_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_num_rows called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_free_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_query called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_store_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_num_rows called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_free_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_query called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_store_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_num_rows called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_free_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_query called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_store_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_num_rows called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_free_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_query called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_free_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_query called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_store_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_fetch_field called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_free_result called when not connected to any database.
    [18:31:38] Anmeldung für Dner111 ist komplett fertig (10ms).
    [18:31:38] [MySQL] Error (0): Function: mysql_query called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_store_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_num_rows called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_free_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_query called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_query called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_store_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_num_rows called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_free_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_query called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_query called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_free_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_query called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_store_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_fetch_field called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_fetch_field called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_fetch_field called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_free_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_query called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_store_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_num_rows called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_free_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_query called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_store_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_num_rows called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_free_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_query called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_store_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_num_rows called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_free_result called when not connected to any database.
    [18:31:38] Für Dner111 werden Autos geladen.
    [18:31:38] [MySQL] Error (0): Function: mysql_query called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_store_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_num_rows called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_free_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_query called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_store_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_num_rows called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_free_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_query called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_store_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_num_rows called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_free_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_query called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_store_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_num_rows called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_free_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_query called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_store_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_num_rows called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_free_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_query called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_store_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_num_rows called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_free_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_query called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_store_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_num_rows called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_free_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_query called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_store_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_num_rows called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_free_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_query called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_store_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_num_rows called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_free_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_query called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_store_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_num_rows called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_free_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_query called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_store_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_num_rows called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_free_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_query called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_store_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_num_rows called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_free_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_query called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_store_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_num_rows called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_free_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_query called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_store_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_num_rows called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_free_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_query called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_store_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_num_rows called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_free_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_query called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_store_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_num_rows called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_free_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_query called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_free_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_query called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_store_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_fetch_field called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_free_result called when not connected to any database.
    [18:31:38] Anmeldung für Dner111 ist komplett fertig (7ms).
    [18:31:38] [MySQL] Error (0): Function: mysql_query called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_store_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_num_rows called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_free_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_query called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_query called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_store_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_num_rows called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_free_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_query called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_query called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_free_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_query called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_store_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_fetch_field called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_fetch_field called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_fetch_field called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_free_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_query called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_store_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_num_rows called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_free_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_query called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_store_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_num_rows called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_free_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_query called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_store_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_num_rows called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_free_result called when not connected to any database.
    [18:31:38] Für Dner111 werden Autos geladen.
    [18:31:38] [MySQL] Error (0): Function: mysql_query called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_store_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_num_rows called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_free_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_query called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_store_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_num_rows called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_free_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_query called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_store_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_num_rows called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_free_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_query called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_store_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_num_rows called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_free_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_query called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_store_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_num_rows called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_free_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_query called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_store_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_num_rows called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_free_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_query called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_store_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_num_rows called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_free_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_query called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_store_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_num_rows called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_free_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_query called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_store_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_num_rows called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_free_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_query called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_store_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_num_rows called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_free_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_query called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_store_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_num_rows called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_free_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_query called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_store_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_num_rows called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_free_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_query called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_store_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_num_rows called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_free_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_query called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_store_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_num_rows called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_free_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_query called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_store_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_num_rows called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_free_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_query called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_store_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_num_rows called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_free_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_query called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_free_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_query called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_store_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_fetch_field called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_free_result called when not connected to any database.
    [18:31:38] Anmeldung für Dner111 ist komplett fertig (6ms).
    [18:31:38] [MySQL] Error (0): Function: mysql_query called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_store_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_num_rows called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_free_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_query called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_query called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_store_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_num_rows called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_free_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_query called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_query called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_free_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_query called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_store_result called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_fetch_field called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_fetch_field called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_fetch_field called when not connected to any database.
    [18:31:38] [MySQL] Error (0): Function: mysql_free_result called when not connected to any database.

  • Baust du die Verbindung möglicherweise erst nach den ganzen Queries auf?
    Poste mal das was im MySQL Log steht, zwecks Verbindung, ganz am Anfang wenn du den Server startest.
    Leere den Log und poste ihn dann, nachdem du den Server gestartet hast.

  • do.de - Domain-Offensive - Domains für alle und zu super Preisen
  • [Wed May 20 20:46:52 2015] MySQL closed. Logging ended.
    [Wed May 20 20:46:52 2015] MySQL closed. Logging ended.
    [Wed May 20 20:46:52 2015] MySQL closed. Logging ended.
    [Wed May 20 20:46:52 2015] MySQL closed. Logging ended.
    [Wed May 20 20:46:52 2015] -------------------------
    [Wed May 20 20:46:52 2015] Logging Ended
    [Wed May 20 20:46:52 2015] -------------------------
    [Wed May 20 20:46:59 2015] -------------------------
    [Wed May 20 20:46:59 2015] Logging Started
    [Wed May 20 20:46:59 2015] -------------------------
    [Wed May 20 20:46:59 2015] Connected (0) to samp5242 @ Localhost via UNIX socket.
    [Wed May 20 20:46:59 2015] MySQL Server Version 5.5.41-0+wheezy1.
    [Wed May 20 20:46:59 2015] Connected (1) to samp5242 @ Localhost via UNIX socket.
    [Wed May 20 20:46:59 2015] MySQL Server Version 5.5.41-0+wheezy1.
    [Wed May 20 20:46:59 2015] Connected (2) to samp5242 @ Localhost via UNIX socket.
    [Wed May 20 20:46:59 2015] MySQL Server Version 5.5.41-0+wheezy1.
    [Wed May 20 20:46:59 2015] Connected (3) to samp5242 @ Localhost via UNIX socket.
    [Wed May 20 20:46:59 2015] MySQL Server Version 5.5.41-0+wheezy1.
    [Wed May 20 20:46:59 2015] Error (0): Function: mysql_store_result called when no prior successful query executed.
    [Wed May 20 20:46:59 2015] Error (0): Function: mysql_num_rows called when no result stored.

  • Jetzt stellst du ja erst wieder 4 Verbindungen her. Er darf sich nur einmal verbinden, es bringt nichts, wenn du das vier mal machst.
    Die beiden Errors kommen, weil du die Funktionen ohne ein Query ausgeführt zu haben aufrufst.


    Bring das soweit hin, dass

    Zitat

    [Wed May 20 20:46:59 2015] Connected (0) to samp5242 @ Localhost via UNIX socket.
    [Wed May 20 20:46:59 2015] MySQL Server Version 5.5.41-0+wheezy1.


    nur einmal im Log steht.

  • Jetzt stellst du ja erst wieder 4 Verbindungen her. Er darf sich nur einmal verbinden, es bringt nichts, wenn du das vier mal machst.
    Die beiden Errors kommen, weil du die Funktionen ohne ein Query ausgeführt zu haben aufrufst.


    Bring das soweit hin, dass


    nur einmal im Log steht.


    Wenn ich das machen würde , funktioniert das ganze Script nichtmehr.


    Mfg

  • Warum denn das? Jedem Server reicht eigentlich eine MySQL Verbindung zur Datenbank. Du musst keine 4-fache Verbindung zur gleichen Datenbank aufbauen. Das bringt nur was, wenn du Daten in verschiedenen Datenbanken hast, was du aber nicht hat, da du vier mal die gleichen Daten zum Login angibst.
    Was funktioniert denn dann nicht mehr, wenn du das änderst?


    Du kannst ja mal ein Backup von deinem Code machen und es dann testen, dann hast du keinen Aufwand falls es nicht klappt.

  • Geht bei mir nicht, da bin ich noch nicht zu Hause. Ich kann dir frühestens Sonntag anbieten, dass ich es mir da mal anschaue, wenn es bis dahin noch nicht erledigt ist. Ansonsten, und das wäre der bessere Weg, mache das was ich dir gesagt habe mal und poste dann den Log der kommt, wenn du versuchst dich einzuloggen.


    Rückgängig kannst du das ja immer noch machen, wenn du ein Backup zuvor machst (nicht vergessen!).

  • Geht bei mir nicht, da bin ich noch nicht zu Hause. Ich kann dir frühestens Sonntag anbieten, dass ich es mir da mal anschaue, wenn es bis dahin noch nicht erledigt ist. Ansonsten, und das wäre der bessere Weg, mache das was ich dir gesagt habe mal und poste dann den Log der kommt, wenn du versuchst dich einzuloggen.


    Rückgängig kannst du das ja immer noch machen, wenn du ein Backup zuvor machst (nicht vergessen!).


    Ok, ich warte lieber auf Sonntag bevor ich noch was falsches mache.
    Da ich nicht sehr sehr erfahren bin wie du.


    mFG

  • In Ordnung, dann würde ich dir am Samstag (morgen) Abend nochmal genau Bescheid sagen, wie es von der Zeit her klappt. Ich gehe aber davon aus, dass ich nachmittags Zeit habe, mir das anzuschauen.
    Außer es findet sich noch jemand anderes, der dir das machen will, dann sagst halt Bescheid. Aber nicht vergessen ein Backup zu machen, falls es nicht klappt ;)

  • In Ordnung, dann würde ich dir am Samstag (morgen) Abend nochmal genau Bescheid sagen, wie es von der Zeit her klappt. Ich gehe aber davon aus, dass ich nachmittags Zeit habe, mir das anzuschauen.
    Außer es findet sich noch jemand anderes, der dir das machen will, dann sagst halt Bescheid. Aber nicht vergessen ein Backup zu machen, falls es nicht klappt ;)


    Ok ^^


    Mfg

  • Das Problem wurde behoben.
    Problem war, dass eine falsche Query ID (777 anstatt 1234) angegeben wurde, beim Laden der Fahrzeuge, zudem hat in der sscanf Funktion ein Wert gefehlt (ganz am Anfang ein Integer).


    Funktioniert nun wie gewünscht.

  • do.de - Domain-Offensive - Domains für alle und zu super Preisen