Jump to content
  • 0

Ajutor mysql extra column


AndyAdv

Question

 Am si eu o mica problema. Eu vreau sa fac baza de date pentru systemul de garaje al lui edison si nu stiu cum sa adaug la ID unde scrie extra chestia asta: 

AUTO_INCREMENT. Ma puteti ajuta? 

 

Edit: Poze https://imgur.com/a/Zu7qBc9

Edited by AndyAdv

YCMD:copianuarevaloare(playerid, params[], help) {
    if(PlayerInfo[playerid][pCopiator] == 1) {
        PlayerInfo[playerid][pProstie] = 9999;
        SendClientMessage(playerid, COLOR_RED, "Felicitari! Ai primit +9999 prostie pentru ca esti un copiator infect");
    }
    return 1;
}

Link to comment
Share on other sites

11 answers to this question

Recommended Posts

  • 0
Just now, L0K3D_Hokage said:

@AndyAdv ce anume nu stii? Ce inseamna AUTO_INCREMENT?

Man adica chestia sa se implementeze automat

 

YCMD:copianuarevaloare(playerid, params[], help) {
    if(PlayerInfo[playerid][pCopiator] == 1) {
        PlayerInfo[playerid][pProstie] = 9999;
        SendClientMessage(playerid, COLOR_RED, "Felicitari! Ai primit +9999 prostie pentru ca esti un copiator infect");
    }
    return 1;
}

Link to comment
Share on other sites

  • 0
4 minutes ago, L0K3D_Hokage said:

@AndyAdv ce anume nu stii? Ce inseamna AUTO_INCREMENT?

https://imgur.com/a/Zu7qBc9 Uite man

 

YCMD:copianuarevaloare(playerid, params[], help) {
    if(PlayerInfo[playerid][pCopiator] == 1) {
        PlayerInfo[playerid][pProstie] = 9999;
        SendClientMessage(playerid, COLOR_RED, "Felicitari! Ai primit +9999 prostie pentru ca esti un copiator infect");
    }
    return 1;
}

Link to comment
Share on other sites

  • 0
3 minutes ago, L0K3D_Hokage said:

image.thumb.png.876c2470b131d13266c470badca44166.png

Daca esti sigur ca nu vei avea vreodata peste 255 de garaje, alege type-ul tinyint si la Length pui 4.

Man si unde la lenght la a 3-a casuta???

 

YCMD:copianuarevaloare(playerid, params[], help) {
    if(PlayerInfo[playerid][pCopiator] == 1) {
        PlayerInfo[playerid][pProstie] = 9999;
        SendClientMessage(playerid, COLOR_RED, "Felicitari! Ai primit +9999 prostie pentru ca esti un copiator infect");
    }
    return 1;
}

Link to comment
Share on other sites

  • 0

Oricum iti multumesc foarte mult! Mz ❤️

YCMD:copianuarevaloare(playerid, params[], help) {
    if(PlayerInfo[playerid][pCopiator] == 1) {
        PlayerInfo[playerid][pProstie] = 9999;
        SendClientMessage(playerid, COLOR_RED, "Felicitari! Ai primit +9999 prostie pentru ca esti un copiator infect");
    }
    return 1;
}

Link to comment
Share on other sites

  • 0

Deci, dai drop coloanei 'ID' si o creezi din nou urmand pasii de mai jos:

Pasul 1:

image.png

 

Pasul 2:

image.thumb.png.876c2470b131d13266c470badca44166.png

Daca esti sigur ca nu vei avea vreodata peste 255 de garaje, alege type-ul tinyint si la Length pui 4.

P.S: Nu e nevoie sa faci posturi aiurea, ai rabdare.

 

Edited by L0K3D_Hokage
Link to comment
Share on other sites

  • 0

Ms mane acum se salvaza garajele in baza. Eu nu stiam ca A.I inseamna AUTO_INCREMENT

 

YCMD:copianuarevaloare(playerid, params[], help) {
    if(PlayerInfo[playerid][pCopiator] == 1) {
        PlayerInfo[playerid][pProstie] = 9999;
        SendClientMessage(playerid, COLOR_RED, "Felicitari! Ai primit +9999 prostie pentru ca esti un copiator infect");
    }
    return 1;
}

Link to comment
Share on other sites

  • 0
13 hours ago, Banditul said:

Lenght nu e necesar pentru int/float. Lenght e mai mult pentru vizualizare(cand te uiti la date)

Evident in varchar/char lenght e obligatoriu

Am pus 11 la lenght mane si merge perfect sistemul de garaje! Nu stiam cum se pune Auto_Increment =]]]

 

YCMD:copianuarevaloare(playerid, params[], help) {
    if(PlayerInfo[playerid][pCopiator] == 1) {
        PlayerInfo[playerid][pProstie] = 9999;
        SendClientMessage(playerid, COLOR_RED, "Felicitari! Ai primit +9999 prostie pentru ca esti un copiator infect");
    }
    return 1;
}

Link to comment
Share on other sites

  • 0
Acum 15 ore, Banditul a spus:

Lenght nu e necesar pentru int/float. Lenght e mai mult pentru vizualizare(cand te uiti la date)

Evident in varchar/char lenght e obligatoriu

Dap, se pun automat valorile, insa sunt obisnuit sa folosesc doar memoria de care am nevoie.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.