31.10.2017, 08:59
mysql_log should be executed once before the mysql_connect line. cache_insert_id() returns 0 because no active cache (should be used in a specified callback at mysql_tquery) like this:
---
About the last, Usaki_Mortsi is unknown column to your database. Create it or check if you misspelled it.
pawn Код:
mysql_format(g_iHandle, query, sizeof(query), "INSERT INTO `srv_users` (Username, Password) VALUES ('%e', '%e')", ReturnName(playerid), inputtext);
mysql_tquery(g_iHandle, query, "OnPlayerRegister", "i", playerid);
pawn Код:
forward OnPlayerRegister(playerid);
public OnPlayerRegister(playerid)
{
// cache_insert_id() will return the "ID" if the field has been set..
// as AUTO_INCREMENT, must also be set as PRIMARY key
}
About the last, Usaki_Mortsi is unknown column to your database. Create it or check if you misspelled it.