MySQL error
#10

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
Код:
mysql_format(1, string,sizeof(string),"...", ...);
Thank you! Working now! <3

Quote:
Originally Posted by azzerking
Посмотреть сообщение
I have only taken a quick look at this however, you put apostrophes around an integer:

I have made it bold
Код:
format(
	string,
	sizeof( string ),
	"INSERT INTO `logs_admin` (`Nombre`,`Administrador`,`Tipo`,`Motivo`,`Tiempo`,`IP`,`IP_Administrador`) VALUES ('%s','%s',1,'%s','%d','%s','%s')",
	GetPlayerNameRP( playerid2 ),
	GetPlayerNameRP( playerid ),
	result,
	time,
	plr2IP,
	plrIP
); 

mysql_query(1, string);
You only need to put apostrophes around values that are of a string type. If its a integer / decimal / float it does not need to be wrapped in apostrophes.
Thank you very much!!!!!
Reply


Messages In This Thread
MySQL error - by arkerooz - 10.10.2016, 16:48
Re: MySQL error - by HydraHumza - 10.10.2016, 16:59
Respuesta: Re: MySQL error - by arkerooz - 10.10.2016, 17:02
Re: MySQL error - by Konstantinos - 10.10.2016, 17:10
Respuesta: Re: MySQL error - by arkerooz - 10.10.2016, 17:29
Re: MySQL error - by Konstantinos - 10.10.2016, 17:36
Respuesta: Re: MySQL error - by arkerooz - 10.10.2016, 17:42
Re: MySQL error - by Konstantinos - 10.10.2016, 17:45
Re: MySQL error - by azzerking - 10.10.2016, 17:51
Respuesta: Re: MySQL error - by arkerooz - 10.10.2016, 19:23

Forum Jump:


Users browsing this thread: 1 Guest(s)