Help please guys!
#8

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:
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.
Reply


Messages In This Thread
Help please guys! - by Maximun - 30.10.2017, 20:09
Re: Help please guys! - by Konstantinos - 30.10.2017, 20:20
Re: Help please guys! - by Maximun - 30.10.2017, 20:42
Re: Help please guys! - by kingmk - 30.10.2017, 21:27
Re: Help please guys! - by Maximun - 30.10.2017, 22:06
Re: Help please guys! - by Konstantinos - 30.10.2017, 22:39
Re: Help please guys! - by Maximun - 30.10.2017, 23:08
Re: Help please guys! - by Konstantinos - 31.10.2017, 08:59
Re: Help please guys! - by Maximun - 31.10.2017, 18:07

Forum Jump:


Users browsing this thread: 1 Guest(s)