30.10.2017, 20:09
Hello everyone, today I'm facing a problem with mysql (Register System), it doesn't create an account on Database
Here's the details : (I'm using R39-4, guys)
When I check 'srv_users' I don't see any account.
Visibly, I see that everything is correct, I don't really know what's wrong
Any question please I'm here
Logs:
Here's the details : (I'm using R39-4, guys)
PHP код:
#define SQL_HOSTNAME "127.0.0.1"
#define SQL_USERNAME "root"
#define SQL_DATABASE "srvdata"
#define SQL_PASSWORD ""
forward SQL_Connect(); //Here's the connection mysql
public SQL_Connect()
{
SQL = mysql_connect(SQL_HOSTNAME, SQL_USERNAME, SQL_DATABASE, SQL_PASSWORD);
printf("Connecting MYSQL"); //It appears on log
return 1;
}
PHP код:
Dialog:Register(playerid, response, listitem, inputtext[])
{
if(!response || !strlen(inputtext))
{
SendClientMessage(playerid, COULEUR_GRIS,"Veuillez mettrer un mot de passe..");
Kick(playerid);
return 1;
}
else if(strlen(inputtext) > 4)
{
new query[400];
mysql_format(SQL, query, sizeof(query), "INSERT INTO srv_users (Username, Password) VALUES ('%e','%e')",ReturnName(playerid), inputtext);
mysql_tquery(SQL, query,"","");
printf("%s", query); //It appears on log
}
return 1;
}
Visibly, I see that everything is correct, I don't really know what's wrong
Any question please I'm here
Logs:
Код:
[17:05:54] [connection] incoming connection: 127.0.0.1:64888 id: 0 [17:05:55] [join] Usaki_Mortsi has joined the server (0:127.0.0.1) [17:06:00] INSERT INTO srv_users (Username, Password) VALUES('Usaki_Mortsi','mdpduserv') [17:07:37] [part] Usaki_Mortsi has left the server (0:1)