21.02.2013, 16:44
Hi. I'm new to the MySQL RC7 with the caching and all.
I did this:
And it always says that the user isn't registered, even when the username exists in the database.
Why does this happen? And I'll be really happy if you could give me a link to a good MySQL RC7 with caching tutorial.
Thanks
I did this:
Код:
public OnPlayerConnect(playerid) {
new rows, fields;
format(str, sizeof(str), "SELECT `id` FROM `users` WHERE `username` = '%s'", GetName(playerid));
mysql_function_query(mysql_con, str, true, "", "d", playerid);
cache_get_data(rows, fields);
if (!rows) {
SendClientMessage(playerid, COLOR_RED, "You aren't registered.");
} else {
SendClientMessage(playerid, COLOR_GREEN, "You are registered.");
}
return 1;
}
Why does this happen? And I'll be really happy if you could give me a link to a good MySQL RC7 with caching tutorial.
Thanks

