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



Mysql create table help. - Crystallize - 21.01.2017

Fixed.


Re: Mysql help. - SyS - 21.01.2017

Код:
CREATE TABLE IF NOT EXISTS `users`(
    `Username` varchar(24) NOT NULL,
    `Password` varchar(128) NOT NULL,
    `Headshots` int(11) NOT NULL,
    `Murders` int(11) NOT NULL,
    `BanditsKilled` int(11) NOT NULL,
    `ZombiesKilled` int(11) NOT NULL,
    `Backpack` int(11) NOT NULL,
    `BackpackSlots` int(11) NOT NULL,
    `BackpackSlotsUsed` int(11) NOT NULL,
    `pAdminLevel` int(11) NOT NULL,
    `pPremium` int(11) NOT NULL,
    `pX` float NOT NULL,
    `pY` float NOT NULL,
    `pZ` float NOT NULL,
    `pWeap1` int(11) NOT NULL,
    `pAmmo1` int(11) NOT NULL,
    `pWeap2` int(11) NOT NULL,
    `pAmmo2`   int(11) NOT NULL,
    `pWeap3` int(11) NOT NULL,
    `pAmmo3` int(11) NOT NULL,
    `pWeap4` int(11) NOT NULL,
    `pAmmo4` int(11) NOT NULL,
    `pWeap5` int(11) NOT NULL,
    `pAmmo5` int(11) NOT NULL,
    `pWeap6` int(11) NOT NULL,
    `pAmmo6` int(11) NOT NULL,
    `pWeap7` int(11) NOT NULL,
    `pAmmo7` int(11) NOT NULL,
    `pWeap8` int(11) NOT NULL,
    `pAmmo8` int(11) NOT NULL,
    `pWeap9` int(11) NOT NULL,
    `pAmmo9` int(11) NOT NULL,
    `pHour` int(11) NOT NULL,
    `pMin` int(11) NOT NULL,
    `pSec` int(11) NOT NULL,
    `pBlood` int(11) NOT NULL,
    `pThrist` int(11) NOT NULL,  
    `pHunger` int(11) NOT NULL,
    `Humanity` int(11) NOT NULL,
    `pFirstSpawn` int(11) NOT NULL,
    `pAliveTime` int(11) NOT NULL,
    `pIsMapOpened` int(11) NOT NULL,
    `pSkin` int(11) NOT NULL,
    `Helper` int(11) NOT NULL,
    `IsPlayerBleeding` int(11) NOT NULL,
    `IsPlayerLegBroken` int(11) NOT NULL,
    `pAmbientEnable` int(11) NOT NULL,
    `DefaultGender` int(11) NOT NULL,
    `IP` varchar(16) NOT NULL,
    `ID` int(11) NOT NULL)
Above one will work (look red parts for changes i made).


Re: Mysql help. - Crystallize - 21.01.2017

One more table in my other DB I see this:http://prntscr.com/dyi6zn in this one there isnt any edit button or delete
http://prntscr.com/dyi726
Says this
http://prntscr.com/dyi7oo


Re: Mysql help. - X337 - 21.01.2017

You need to set up Primary key or Unique key in that table.


Re: Mysql help. - Crystallize - 21.01.2017

Fixed by adding it to primary , thanks!


Re: Mysql help. - Yaa - 21.01.2017

keep the first post dont remove it :/

let others get an idea how to fix the problem if they got something like this


Re: Mysql create table help. - oMa37 - 21.01.2017

nvm, i didn't read all the posts lol.


Re: Mysql create table help. - Crystallize - 21.01.2017

Quote:
Originally Posted by oMa37
Посмотреть сообщение
Didn't expect that from you.
Didnt expect what?


Re: Mysql help. - Yaa - 21.01.2017

Quote:

Do Not Request Private Help - The point of this forum is to ask for help, get help, and share that help. The help is shared by the fact its posted in a thread that other people can search on. Posting you need help, then keeping it private (via Skype or whatever) goes COMPLETELY against the "community" thing that we've established here. If you want help but want to keep it private... then you can ask in private and NOT on these forums.

by ******.

keep the first post on dont delete it ?


Re: Mysql help. - oMa37 - 21.01.2017

He already said how he fixed it.

Quote:
Originally Posted by Crystallize
Посмотреть сообщение
Fixed by adding it to primary , thanks!