Little help - MYSQL.
#1

I have this code.

Код:
GetNameFromSql(accId)
{
	new 
		query[STR_MAX],
		strid[32]
	;
	format(query, sizeof(query), "SELECT Name FROM players WHERE accid = '%d' LIMIT 1", accId);
	mysql_query(query);
	mysql_store_result();
	if(mysql_num_rows()==0)
	{
		format(strid, sizeof(strid), "None");
		return strid;
	}
	else
	{
		mysql_fetch_row(strid);
		new intid[32];
		strmid(intid, strid, 0, strlen(strid), 255);
		mysql_free_result();
		return intid;
	}
}
Now, this code will print my name as Test_User, but I want that it types Test User, without _
Please help!
Reply


Messages In This Thread
Little help - MYSQL. - by NewbBeginner - 03.07.2011, 14:25
Re: Little help - MYSQL. - by =WoR=Varth - 04.07.2011, 00:14
Re: Little help - MYSQL. - by NewbBeginner - 05.07.2011, 17:14
Re: Little help - MYSQL. - by =WoR=Varth - 06.07.2011, 00:06
Re: Little help - MYSQL. - by NewbBeginner - 06.07.2011, 14:11
Re: Little help - MYSQL. - by CoaPsyFactor - 06.07.2011, 14:20

Forum Jump:


Users browsing this thread: 3 Guest(s)