[HELP] column -
Luca12 - 20.05.2014
Hello I was trying to update when player disconnect from server then I update some text to variable PlayerInfo[playerid][OffBanReason] and I put NoReason to be updated in mysql column OffBanReason and then I go to disconnect and in mysql log says
(error #1054) Unknown column 'NoReason' in 'field list'
Why is that happening. Thanks
here is that on onplayerdisconnect
pawn Код:
if(PlayerInfo[playerid][OffBaned] == 0)
{
strmid(PlayerInfo[playerid][OffBanReason],"NoReason",0,strlen("NoReason"),255);
}
Re: [HELP] noreason column -
Luca12 - 21.05.2014
anyone? thanks
Re: [HELP] noreason column -
Konstantinos - 21.05.2014
The column is 'OffBanReason' and not 'NoReason'.
Re: [HELP] noreason column -
Luca12 - 21.05.2014
No you get me wrong I want in offbanreason update text NoReason which mean that player is not banned for example offban. If you know what I mean. I was trying update to OffBanReason to says NoReason.
Re: [HELP] noreason column -
Konstantinos - 21.05.2014
And I'm saying again: the column is 'OffBanReason' like you said in your first post. 'No reason' is the text that will be stored in that column, it is NOT a column itself.
Re: [HELP] noreason column -
Luca12 - 21.05.2014
But that text is not storing in the column offbanreason that is the problem offbanreason column is empty but it should be says NoReason. and in mysql log says Unknown NoReason in field list. Thanks
Re: [HELP] noreason column -
Konstantinos - 21.05.2014
It is not stored because the column you wrote is wrong. The column is 'OffBanReason' and the text to be stored is 'NoReason'. You use 'NoReason' as a column which does not exist in your table; therebefore it gives the error and it does not store the data.
Re: [HELP] noreason column -
Luca12 - 21.05.2014
Can you maybe give the wright code how it should be like? Thanks
Re: [HELP] noreason column -
Konstantinos - 21.05.2014
Post your code that you execute the query.
Re: [HELP] noreason column -
Luca12 - 21.05.2014
pawn Код:
mysql_format(mysql,query,sizeof(query),"UPDATE `users` SET `House` = %d,`OffBanReason` = %s WHERE `ID` = '%d'",
PlayerInfo[playerid][House],PlayerInfo[playerid][OffBanReason],PlayerInfo[playerid][ID]);
mysql_tquery(mysql,query,"","");
This? Thanks