MySQL input line too long (after substitutions) - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: MySQL input line too long (after substitutions) (
/showthread.php?tid=398885)
Fixed -
andrew2695 - 11.12.2012
Thx guys.
Re: MySQL input line too long (after substitutions) -
Vince - 11.12.2012
Manually create the table in phpMyAdmin. No sense in coding something that only gets executed once in the lifetime of the server. You may keep the SQL code in a separate file for later reference.
AW: MySQL input line too long (after substitutions) -
Kevin54321 - 11.12.2012
Hello
pawn Код:
new Query[1000];
strcat(Query,
"CREATE TABLE IF NOT EXISTS `Accounts` ( \
`ID` int(11) NOT NULL AUTO_INCREMENT, \
`Name` varchar(24) NOT NULL, \
`Password` varchar(129) NOT NULL, \
`RegDate` int(11) NOT NULL, \
`RegisteredIP` varchar(16) NOT NULL, \
`LastLogin` int(11) NOT NULL, \
`LastKnownIP` varchar(16) NOT NULL, \
`Admin` int(11) NOT NULL, \
`Skin` int(11) NOT NULL, \
`Team` int(11) NOT NULL, \
`InBank` int(11) NOT NULL, \
`InHand` int(11) NOT NULL,");
strcat(Query, "`Score` int(11) NOT NULL, \
`Kills` int(11) NOT NULL, \
`Deaths` int(11) NOT NULL, \
`Regular` int(11) NOT NULL, \
`Donator` int(11) NOT NULL, \
`CitySpawn` int(11) NOT NULL, \
`SpeedUnit` int(11) NOT NULL, \
`Plate` varchar(24) NOT NULL, \
`Color1` int(11) NOT NULL, \
`Color2` int(11) NOT NULL, \
`AutoCorrect` int(11) NOT NULL, \
`Hours` int(11) NOT NULL, \
`Minutes` int(11) NOT NULL, \
`Seconds` int(11) NOT NULL, \
PRIMARY KEY (`ID`))");
mysql_function_query(mysql,g_handle, false, "SendQuery", "");
Tested & Worked
But I am the same opinion like "Vince".
You don`t need it ...
The same is when a player register:
Why save everything to zero (,... level to one, money to a special amount, ...)?
You can save standard-values in the mysql-database (and its very easy!).
Then on the first login (register) you must only save things like the name and the password.
Greetz
~ Kevin
Re : MySQL input line too long (after substitutions) -
andrew2695 - 11.12.2012
I have edited my last thread instead of making a new one thanks for you help guys but I have a new problem on the save part.