SA-MP Forums Archive
Query help - 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: Query help (/showthread.php?tid=591241)



Query help - Hybris - 09.10.2015

I'm trying to make multiple query's because I don't want my line to be too long but when I do it this way it doesn't even work
Код:
new query[200];
  	db_query(Database, "CREATE TABLE IF NOT EXISTS Users (Userid INTEGER PRIMARY KEY AUTOINCREMENT, Username VARCHAR(24) COLLATE NOCASE, password VARCHAR(129)");
	strcat(query, "Admins INTEGER DEFAULT 0 NOT NULL, Premium INTEGER DEFAULT 0 NOT NULL, Money INTEGER DEFAULT 0 NOT NULL, Score INTEGER DEFAULT 0 NOT NULL");
	strcat(query,"Kills INTEGER DEFAULT 0 NOT NULL, Deaths INTEGER DEFAULT 0 NOT NULL, KD INTEGER DEFAULT 0 NOT NULL");
Any tips?


Re: Query help - Vince - 09.10.2015

Quote:
Originally Posted by Hybris
Посмотреть сообщение
Any tips?
Don't hardcode DDL statements.