Input line too long (after substitutions)
#1

Line

Код:
PRIMARY KEY (`id`) \
Whole code

Код:
	mysql_function_query(g_Handle, "CREATE TABLE IF NOT EXISTS `users` ( \
		`id` int(11) NOT NULL AUTO_INCREMENT, \
		`name` varchar(24) NOT NULL, \
		`pass` varchar(129) NOT NULL, \
		`salt` varchar(30) NOT NULL, \
		`health` float NOT NULL, \
		`X` float NOT NULL, \
		`Y` float NOT NULL, \
		`Z` float NOT NULL, \
		`A` float NOT NULL, \
		`interior` int(2) NOT NULL, \
		`vw` int(11) NOT NULL, \
		`money` int(8) NOT NULL, \
		`level` int(2) NOT NULL, \
		`skin` int(3) NOT NULL, \
		PRIMARY KEY (`id`) \
	)", false, "SendQuery", "");
Reply
#2

EDIT:
pawn Код:
new str[1300];
format(str,sizeof(str),"CREATE TABLE IF NOT EXISTS `users` ( ");
strcat(str,"`id` int(11) NOT NULL AUTO_INCREMENT,`name` varchar(24) NOT NULL,`pass` varchar(129) NOT NULL,`salt` varchar(30) NOT NULL,");
strcat(str,"`health` float NOT NULL,`X` float NOT NULL,`Y` float NOT NULL,`Z` float NOT NULL,`A` float NOT NULL,`interior` int(2) NOT NULL,");
strcat(str,"`vw` int(11) NOT NULL,`money` int(8) NOT NULL,`level` int(2) NOT NULL,`skin` int(3) NOT NULL,PRIMARY KEY (`id`))");

mysql_function_query(g_Handle,str , false, "SendQuery", "");
Reply
#3

I just replace my code with this or?
Reply
#4

Quote:
Originally Posted by aa
Посмотреть сообщение
I just replace my code with this or?
Check the edited code above!
Reply
#5

Thanks mate. Works perfectly.
Reply
#6

The problem was solved with strcat, but I will explain you what mistake did you do and you can use it with the way you did '\'.
pawn Код:
mysql_function_query(g_Handle, "CREATE TABLE IF NOT EXISTS `users` ( \
        `id` int(11) NOT NULL AUTO_INCREMENT, \
        `name` varchar(24) NOT NULL, \
        `pass` varchar(129) NOT NULL, \
        `salt` varchar(30) NOT NULL, \
        `health` float NOT NULL, \
        `X` float NOT NULL, \
        `Y` float NOT NULL, \
        `Z` float NOT NULL, \
        `A` float NOT NULL, \
        `interior` int(2) NOT NULL, \
        `vw` int(11) NOT NULL, \
        `money` int(8) NOT NULL, \
        `level` int(2) NOT NULL, \
        `skin` int(3) NOT NULL, \
        PRIMARY KEY (`id`) )"
, false, "SendQuery", "");
The symbol '\' can be used inside the " ", and for each time, it's like continues the string on the next line. You used the symbol and then a parenthesis ')'. Although, that was not a part from a string. Check the code above which is the correct way.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)