Jump to content
  • 0

Problema Baza de date


Kizum

Question

Nu ma pot loga pe server

am conectat baza de date la host tot si cand intru si bag parola de la register

nu merge si in log uri am chestia asta

 [22:05:02] Error ID: 1364, Eroare: Field 'password2' doesn't have a default value [22:05:02] Callback: [22:05:02] gQuery: INSERT INTO users (name,password, Age, Email, Model, RegisterDate, CChar) VALUES ('Kizum','3A4E917953EF38B2461226ECE2E7C2FB','10', '[email protected]', '0', '2021-2-7 22:5:2', '250')
 

Gamemode Chars

 

------Linia de cod din pawno-----

mysql_format(SQL, gQuery, sizeof(gQuery),"INSERT INTO users (name,password, Age, Email, Model, RegisterDate, CChar) VALUES ('%s','%s','%d', '%s', '%d', '%s', '%d')",GetName(playerid), password, PlayerInfo[playerid][pAge], PlayerInfo[playerid][pEmail], PlayerInfo[playerid][pModel], getdata, PlayerInfo[playerid][pChar]);

 mysql_tquery(SQL, gQuery, "", "");

unknown (1).png

Link to comment
Share on other sites

8 answers to this question

Recommended Posts

  • 0
3 minutes ago, Banditul said:

Pentru ca trebuie ori sa modifici tabelul users si la password2 sa adaugi o valoare default ori la query tau de insert sa inserezi si password2 impreuna cu restul

am pus cum ai zis tu acolo la insert password2 si acuma am alta erroare

[13:58:44] Error ID: 1136, Eroare: Column count doesn't match value count at row 1
[13:58:44] Callback: 
[13:58:44] gQuery: INSERT INTO `users` (`name`,`password`,`password2`, `Age`, `Email`, `Model`, `RegisterDate`, `CChar`) VALUES ('syntax.','3A4E917953EF38B2461226ECE2E7C2FB','19', '[email protected]', '0', '2021-2-8 13:58:44', '250')
 

Link to comment
Share on other sites

  • 0

Hai sa iti traduc eroarea.

Quote

[13:58:44] ID Eroare: 1136, Eroare: Numarul de coloane nu este egal cu numarul de valori la randul 1.
[13:58:44] Callback: 
[13:58:44] gQuery: INSERT INTO `users` (`name`,`password`,`password2`, `Age`, `Email`, `Model`, `RegisterDate`, `CChar`) VALUES ('syntax.','3A4E917953EF38B2461226ECE2E7C2FB','19', '[email protected].com', '0', '2021-2-8 13:58:44', '250')

Daca incepi sa iei valorile la numarat, o sa iti dai seama ca in (`name`,`password`,`password2`, `Age`, `Email`, `Model`, `RegisterDate`, `CChar`) ai 8 valori, dar in ('syntax.','3A4E917953EF38B2461226ECE2E7C2FB','19', '[email protected].com', '0', '2021-2-8 13:58:44', '250') ai doar 7.

Cel mai probabil, iti lipseste valoarea a treia, care ar trebui sa corespunda cu "password2" pe care tocmai l-ai adaugat. 

Incearca asta:

 INSERT INTO `users` (`name`,`password`,`password2`, `Age`, `Email`, `Model`, `RegisterDate`, `CChar`) VALUES ('syntax.','3A4E917953EF38B2461226ECE2E7C2FB','3A4E917953EF38B2461226ECE2E7C2FB','19', '[email protected]', '0', '2021-2-8 13:58:44', '250')

Am adaugat inca odata field-ul de 'password', in 'password2'.

Link to comment
Share on other sites

  • 0
10 minutes ago, CritteR said:

Hai sa iti traduc eroarea.

Daca incepi sa iei valorile la numarat, o sa iti dai seama ca in (`name`,`password`,`password2`, `Age`, `Email`, `Model`, `RegisterDate`, `CChar`) ai 8 valori, dar in ('syntax.','3A4E917953EF38B2461226ECE2E7C2FB','19', '[email protected].com', '0', '2021-2-8 13:58:44', '250') ai doar 7.

Cel mai probabil, iti lipseste valoarea a treia, care ar trebui sa corespunda cu "password2" pe care tocmai l-ai adaugat. 

Incearca asta:

 INSERT INTO `users` (`name`,`password`,`password2`, `Age`, `Email`, `Model`, `RegisterDate`, `CChar`) VALUES ('syntax.','3A4E917953EF38B2461226ECE2E7C2FB','3A4E917953EF38B2461226ECE2E7C2FB','19', '[email protected]', '0', '2021-2-8 13:58:44', '250')

Am adaugat inca odata field-ul de 'password', in 'password2'.

ok dar faza aia e in log uri gen asa apare in logs cu syntax bla bla dar eu in pawno am cu %s 
 

mysql_format(SQL, gQuery, sizeof(gQuery),"INSERT INTO `users` (`name`,`password`,`password2`, `Age`, `Email`, `Model`, `RegisterDate`, `CChar`) VALUES ('%s','%s','%d', '%s', '%d', '%s', '%d')",GetName(playerid), password, PlayerInfo[playerid][pAge], PlayerInfo[playerid][pEmail], PlayerInfo[playerid][pModel], getdata, PlayerInfo[playerid][pChar]);

 

asta am eu gen in pawno

Link to comment
Share on other sites

  • 0
mysql_format(SQL, gQuery, sizeof(gQuery),"INSERT INTO `users` (`name`,`password`,`password2`, `Age`, `Email`, `Model`, `RegisterDate`, `CChar`) VALUES ('%s','%s','%s','%d', '%s', '%d', '%s', '%d')",GetName(playerid), password, password, PlayerInfo[playerid][pAge], PlayerInfo[playerid][pEmail], PlayerInfo[playerid][pModel], getdata, PlayerInfo[playerid][pChar]);

Acelasi lucru. Ai 8 coloane, deci trebuie sa introduci 8 valori. Acum am adaugat un '%s' ca si a treia valorare, si am copiat 'password' inca odata.

edit: Nu stiu la ce ai avea nevoie de 'password2' in baza de date. Am adaugat parola inca odata cu gandul ca o sa o schimbi tu daca e nevoie.

Edited by CritteR
Link to comment
Share on other sites

  • 0
24 minutes ago, CritteR said:
mysql_format(SQL, gQuery, sizeof(gQuery),"INSERT INTO `users` (`name`,`password`,`password2`, `Age`, `Email`, `Model`, `RegisterDate`, `CChar`) VALUES ('%s','%s','%s','%d', '%s', '%d', '%s', '%d')",GetName(playerid), password, password, PlayerInfo[playerid][pAge], PlayerInfo[playerid][pEmail], PlayerInfo[playerid][pModel], getdata, PlayerInfo[playerid][pChar]);

Acelasi lucru. Ai 8 coloane, deci trebuie sa introduci 8 valori. Acum am adaugat un '%s' ca si a treia valorare, si am copiat 'password' inca odata.

edit: Nu stiu la ce ai avea nevoie de 'password2' in baza de date. Am adaugat parola inca odata cu gandul ca o sa o schimbi tu daca e nevoie.

Error ID: 1364, Eroare: Field 'Victim' doesn't have a default value
[14:54:10] Callback: 
[14:54:10] gQuery: INSERT INTO `users` (`name`,`password`,`password2`, `Age`, `Email`, `Model`, `RegisterDate`, `CChar`) VALUES ('syntax.','3A4E917953EF38B2461226ECE2E7C2FB','3A4E917953EF38B2461226ECE2E7C2FB','19', '[email protected]', '0', '2021-2-8 14:54:10', '250')
 

password2 e cred pt ca e system ul de login ca b-hood ul sau ca trb sa pui obligatoriu o litere mare la inceput de parola 

idk 

Link to comment
Share on other sites

  • 0
3 hours ago, CritteR said:

Iti recomand sa te uiti in baza de date la 'users' si sa vezi toate variabilele de care ai nevoie.

Am rezolvat cred

am facut ticket la host si miau explicat iei care e faza cu phpmyadmin ca iei au 2 versiuni una mariadb si una fara mariadb

 

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.