[HELP]Mysql Problem
#1

Hy guys.I need help i have problems with this
Код:
 Error info: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''10FFA4B8F2646A56ACA4106DB4BB4E07DC0AF7EF947E07C47CFBBB5' at line 1 | ID: 1064
Result ID: 4 | Extra ID: 0 | Callback: OnQueryFinish
Query: SELECT `ID` FROM `Players` WHERE `Name` = 'Nikola_Vuzee' AND `Password` = '10FFA4B8F2646A56ACA4106DB4BB4E07DC0AF7EF947E07C47CFBBB5
what is that?And when i quit from server and againg connect i type wrong password or correct pasword and server is spawn me?What is not ok?
Reply
#2

check the line mentioned above..
i think you forgot a ' a the end

it should look like thisL

Password` = '%s' and what you have now is, i think password = '
Reply
#3

Quote:
Originally Posted by Jari_Johnson*
Посмотреть сообщение
check the line mentioned above..
i think you forgot a ' a the end

it should look like thisL

Password` = '%s' and what you have now is, i think password = '
Look it is ok:

Код:
if(dialogid == 27)
	{
	    if(response)
	    {
	        PrijavaSpremna[playerid] = 0;
	        if(strlen(inputtext) < MIN_DUZINA_LOZINKE || strlen(inputtext) > MAX_DUZINA_LOZINKE)
	        {
	            new imex[MAX_PLAYER_NAME];
			ImeIgraca(playerid, imex);
			new upit[128], escinput[32], buf[129];
			mysql_real_escape_string(inputtext, escinput);
			WP_Hash(buf, 129, escinput);
	            new string[128];
	            format(string, sizeof string, "(greska) Lozinka mora sadrzati najmanje %d, a najvise %d znakova.", MIN_DUZINA_LOZINKE, MAX_DUZINA_LOZINKE);
	            SCM(playerid, CRVENA, string);
	            new string1[256];
				new hIme[MAX_PLAYER_NAME];
				ImeIgraca(playerid, hIme);
				format(string1, sizeof string1, "{FFFFFF}Dobrodosli {00a2f5}%s\n{FFFFFF}Vas nalog je pronadjen. Molimo upisite svoju lozinku:", hIme);
				SPD(playerid, 27, DIALOG_STYLE_PASSWORD, "{00a2f5}Battle Craft RPG - PRIJAVA", string1, "Prijava", "Odustani");
				format(upit, 128, "SELECT `*` FROM `Players` WHERE `Name` = '%s' AND `Password` = '%s'", imex, buf);
				mysql_query(upit, THREAD_PASSPROVERA, playerid);
				return 1;
			}
			new imex[MAX_PLAYER_NAME];
			ImeIgraca(playerid, imex);
			new upit[128], escinput[32], buf[129];
			mysql_real_escape_string(inputtext, escinput);
			WP_Hash(buf, 129, escinput);
			format(upit, 128, "SELECT `ID` FROM `Players` WHERE `Name` = '%s' AND `Password` = '%s'", imex, buf);
			mysql_query(upit, THREAD_PASSPROVERA, playerid);
		}
		else Kick(playerid);
	}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)