sqlite count()
#1

Hi, I'm creating a namechange dialog and I don't want the player to be able to change his name if it's used already, but it's not working for some reason. This is the part which is not working:
Код:
new query[100], DBResult:result;
					
format(query, sizeof(query), "SELECT COUNT(*) FROM accounts WHERE Name = 'q' COLLATE NOCASE", inputtext);
result = db_query(database, query);
					
if (db_get_field_int(result, 0)) ShowPlayerDialog(playerid, DIALOG_CHANGE_NAME, DIALOG_STYLE_INPUT, "Change Name", "That name is already in use by someone else.\nPlease type your new desired name below:", "Change", "Cancel");
so basically it returns 0 rows while there is actually a row with the name I'm trying to set for myself. What's the problem?

EDIT: lol i'm stupid it has to be %q
Reply


Messages In This Thread
sqlite count() - by GoldenLion - 15.04.2017, 14:02
Re: sqlite count() - by Nero_3D - 15.04.2017, 15:49
Re: sqlite count() - by AndreiWow - 15.04.2017, 20:02

Forum Jump:


Users browsing this thread: 1 Guest(s)