SA-MP Forums Archive
Is there any good MySQL table structure example - 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: Is there any good MySQL table structure example (/showthread.php?tid=457379)



Is there any good MySQL table structure example - Cypress - 11.08.2013

Eh up,

I've been messing with MySQL recently and so far can't find any good table structure for MySQL. My question is if there is any good example of it. I've got this one, but it doesn't seem to be a paradise.

pawn Код:
/* Table Structure - kind of messy, I know. */
    mysql_function_query(g_Handle, "CREATE TABLE IF NOT EXISTS `users` ( \
        `id` int(11) NOT NULL AUTO_INCREMENT, \
        `name` varchar(24) NOT NULL, \
        `pass` varchar(129) NOT NULL, \
        `salt` varchar(30) NOT NULL, \
        `health` float NOT NULL, \
        `X` float NOT NULL, \
        `Y` float NOT NULL, \
        `Z` float NOT NULL, \
        `A` float NOT NULL, \
        `interior` int(2) NOT NULL, \
        `vw` int(11) NOT NULL, \
        `skin` int(3) NOT NULL, \
        PRIMARY KEY (`id`) \
    )"
, false, "SendQuery", "");



Re: Is there any good MySQL table structure example - RajatPawar - 11.08.2013

I personally avoid writing table creation queries by hand, I just create the table using PHPMyAdmin (just add whatever fields you REQUIRE, their datatype) and then retrieve the table code given in one of the settings! Or probably scout around SA-MP to find a good MySQL script and check out the structure there!