[HELP]Mysql Problem
#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


Messages In This Thread
[HELP]Mysql Problem - by Dusan01 - 05.06.2012, 15:52
Re: [HELP]Mysql Problem - by Jstylezzz - 05.06.2012, 15:55
Re: [HELP]Mysql Problem - by Dusan01 - 05.06.2012, 16:07

Forum Jump:


Users browsing this thread: 1 Guest(s)