Data base error? -
Seifspeed - 11.04.2014
I am using a script and i think it uses an inline data base when i want to log in it says type password to register and when i do i stay like that like a freeze almost.
Re: Data base error? -
arakuta - 11.04.2014
Can you paste the code here? Probably the DialogResponse handle for registering. Thanks.
Re : Data base error? -
Seifspeed - 11.04.2014
I don't really know where is the coe but think this?
stock OnPlayerRegister(playerid, password[])
{
if(IsPlayerConnected(playerid))
{
new
sqlQuery[500],
playername3[MAX_PLAYER_NAME],
password2 = num_hash(password),
playersip[24],
randphone = 100000 + random(899999), //minimum 1000 max 9999 //giving one at the start
registered[24];
new y,m,d,h,mi,s;
getdate(y,m,d); gettime(h,mi,s);
format(registered,sizeof(registered), "%d/%d/%d at %d:%d:%d",d,m,y,h,mi,s);
GetPlayerName(playerid, playername3, sizeof(playername3));
GetPlayerIp(playerid, playersip, sizeof(playersip));
format(sqlQuery, sizeof(sqlQuery), "INSERT INTO samp_users SET `Username`='%s', `Password`='%d', `PhoneNr`='%d', `IP`='%s', `RegistredDate`='%s'", playername3, password2, randphone, playersip, registered);
mysql_query(sqlQuery, THREAD_REGISTER, playerid);
}
return 1;
}
Re: Data base error? -
arakuta - 11.04.2014
Yup, it needs a MySQL database server. You need to have one and configure it properly both on your script and your mysql databse.
https://sampforum.blast.hk/showthread.php?tid=129183
Re : Data base error? -
S4t3K - 11.04.2014
Also, MySQL datetimes looks like this :
PHP код:
2014-04-11 17:38:22
// Not like that
2014/04/11 17:38:22
Even if you plan to split the string with "split" (ofc), use a correct DATETIME format (they are here for that I think), instead of a VARCHAR which stands for a DATETIME.
Re : Data base error? -
Seifspeed - 11.04.2014
Does this require me to have a website or something.
Re: Re : Data base error? -
Konstantinos - 11.04.2014
Quote:
Originally Posted by S4t3K
Also, MySQL datetimes looks like this :
PHP код:
2014-04-11 17:38:22
// Not like that
2014/04/11 17:38:22
Even if you plan to split the string with "split" (ofc), use a correct DATETIME format (they are here for that I think), instead of a VARCHAR which stands for a DATETIME.
|
He wants to save it as string and load it as string without splitting it later on. However using unix timestamp to save it and then load and use
from_unixtime in the query to load it with any format you specify.
---
It requires a MySQL server.