SA-MP Forums Archive
[Question] MySQL - 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: [Question] MySQL (/showthread.php?tid=315671)



[Question] MySQL - ttloko2 - 04.02.2012

Код:
    mysql_query("CREATE TABLE IF NOT EXISTS Factions(FactionID INT(1) NOT NULL, Leader INT(1) NOT NULL, Members INT(15) NOT NULL)");
	mysql_query("CREATE TABLE IF NOT EXISTS PlayerInfo(Name VARCHAR(25), Password VARCHAR(25), Level INT(3), VIP INT(1), AdminLevel INT(1)");
i made these querys but Factions table is the only table to create, soo what should i do to create the playerinfo?
obs: both are on onfilterscriptinit


Re: [Question] MySQL - [HiC]TheKiller - 04.02.2012

You're missing the closing ')' on the playerdata create table but there may be more issues. Use mysql_debug(1); before those lines then post your MySQL log that is in your server directory if problems persist.


Re: [Question] MySQL - ttloko2 - 04.02.2012

Sorry, my bad, it was only the ґ)ґ thank you for your quick answer.


Re: [Question] MySQL - ttloko2 - 04.02.2012

i got a new error :

[01:31:10] CMySQLHandler::Query(INSERT PlayerInfo(Name, Password, Level, VIP, AdminLevel, Faction) VALUES (Player, senha, 0, 0, 0, 'none')) - An error has occured. (Error ID: 1054, Unknown column 'Player' in 'field list')

any ideas?


Re: [Question] MySQL - [HiC]TheKiller - 04.02.2012

All string values must be in-cased with ' and ' like you did with the value 'none'.


Re: [Question] MySQL - ttloko2 - 04.02.2012

thank you again