MySQL input line too long (after substitutions)
#1

Thx guys.
Reply
#2

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.
Reply
#3

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
Reply
#4

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)