it says there is 0 raw but there is 1 raw
#1

it always create new user when there is already an user with the same name ( it give me 0 raw )
Код HTML:
new queryy[200] ;
format(queryy, 128, "SELECT * users WHERE username = '%s'", PlayerName(playerid) );
new row_count;
mysql_query(g_Sql, queryy);
cache_get_row_count(row_count) ;
if(row_count == 1)
{
    SendClientMessage(playerid, COLOR_PURPLE, "[MYSQL] Your account found in the mysql");
}
if(row_count == 0)
{
    format(string,sizeof(string),"INSERT INTO `users` (`username`) VALUES ('%s')",PlayerName(playerid));
    mysql_query(g_Sql, string);
    SendClientMessage(playerid, COLOR_PURPLE, "[MYSQL] Your account added to the mysql");
}
Reply


Messages In This Thread
it says there is 0 raw but there is 1 raw - by fastayko - 07.01.2017, 22:06
Re: it says there is 0 raw but there is 1 raw - by GoldenLion - 07.01.2017, 22:23
Re: it says there is 0 raw but there is 1 raw - by Jefff - 07.01.2017, 22:24

Forum Jump:


Users browsing this thread: 1 Guest(s)