07.01.2017, 22:06
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"); }