Account not save mysql except pass and pseudo
#3

pawn Код:
[DEBUG] Calling callback "CreationCompte"..
[DEBUG] cache_get_field_content_int - row: 0, field_name: "id", connection: 1
[ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
[ERROR] cache_get_field_content_int - invalid datatype
This pretty much tells the problem. When you insert a new row into the table, you are trying to retrieve the unique ID but you use cache_get_field_content_int function. Those functions are used when you use SELECT queries, the function you need is:
pawn Код:
// CreationCompte:
pinfo[playerid][ID] = cache_insert_id();
Now that the correct ID has been assigned to the variable, the affected rows will not be 0 as before and it will actually update the data.
Reply


Messages In This Thread
Account not save mysql except pass and pseudo - by Skinnz - 11.08.2016, 22:05
Re: Account not save mysql except pass and pseudo - by BroZeus - 12.08.2016, 04:42
Re: Account not save mysql except pass and pseudo - by Konstantinos - 12.08.2016, 09:04

Forum Jump:


Users browsing this thread: 4 Guest(s)