Help with MYSQL, Avoid Dual Records?
#2

pawn Код:
new name[24];
mysql_escape_string(Pname(playerid), name);
format(query,sizeof(query),"SELECT * FROM `%s`  WHERE Username = %s",SQL_TABLE, name);
mysql_query(query);
mysql_store_result();
if(mysql_num_rows > 0) return SendClientMessage(playerid,COLOR_SERVER_WARNING,"[ERROR]: This username is already registered!");
mysql_free_result();
That should do it .
Reply


Messages In This Thread
Help with MYSQL, Avoid Dual Records? - by almighty - 04.10.2010, 22:27
Re: Help with MYSQL, Avoid Dual Records? - by [HiC]TheKiller - 04.10.2010, 22:35
Respuesta: Help with MYSQL, Avoid Dual Records? - by almighty - 04.10.2010, 22:52
Re: Respuesta: Help with MYSQL, Avoid Dual Records? - by [HiC]TheKiller - 05.10.2010, 01:41

Forum Jump:


Users browsing this thread: 1 Guest(s)